From: Alexis T. <ale...@sm...> - 2012-03-21 12:37:02
|
By the way, It's really strange to do a foreach in order to retrieve key/values in a map. Le 21/03/2012 12:40, anleb a écrit : > Hello, > Probably, it was broken in revision #611 > class net.webassembletool.output.Output > revision 610 code > > public final void addHeader(String name, String value) { > headers.put(name, value); > } > > revision 611 code > > public final void addHeader(String name, String value) { > List<String> values = null; > for (Entry<String, List<String>> entry : headers.entrySet()) { > if (name.equalsIgnoreCase(entry.getKey())) { > values = entry.getValue(); > break; > } > } > if (values == null) { > values = new ArrayList<String>(); > headers.put(name, values); > } > values.add(value); > } > > So in the same method we do iteration over headers and change them, in > multi thread environment this can cause problem. > The easiest way to fix it, to add 'synchronized' to follow methods in > class net.webassembletool.output.Output: > public synchronized final String getHeader(String key) > public synchronized final void setHeader(String key, String value) > public synchronized final void setHeader(String key, String value) > > On 03/21/2012 12:44 PM, Nicolas Richeton wrote: >> Hi all >> >> We have an issue with with ESIGate 2.19 under load, resulting to 100% cpu usage and lock. >> >> Please have a look to : >> http://sourceforge.net/apps/mantisbt/webassembletool/view.php?id=84 >> >> We have the setup show the issue, but not easy to test. Problem arises after several hours. >> >> This seems to be linked to the new cache system because older versions of ESIGate did not show any locking under heavy load. >> >> Andreii : any idea/comments on this issue ? >> >> Nicolas > > > -- > Best Regards, > Andrei Lebedinskiy, > Java Web Developer > Smile Ukraine - Open source Solutions in Ukraine > www.smile-ukraine.com > Skype:lebedinskii > E-mail:an...@sm... > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > > _______________________________________________ > Webassembletool-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webassembletool-devel -- Alexis Thaveau Agence Nantes Smile - Open Source Solutions http://www.smile.fr Tél : 02 40 08 68 10 Mailto : ale...@sm... |