Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003226 [Resin] minor sometimes 01-07-09 02:27 01-29-09 14:55
Reporter lookis View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.0 Product Version 3.0.21
  Product Build
Summary 0003226: There are two "synchronized lock"s in the frequence operation,this cause slow
Description HttpServletRequest request;

i post a data to an action,in my action code,when I first running request.getParameter("");it will initial the "_filledForm" in the with "private HashMapImpl<String,String[]> parseQuery()"

and i found when i running here "_formParser.parsePostData(_form, getInputStream(), javaEncoding);"

finally the code will be here

  public static String getMimeName(String encoding)
    if (encoding == null)
      return null;

    String value = _mimeName.get(encoding);
    if (value != null)
      return value;

    String upper = normalize(encoding);

    String lookup = _mimeName.get(upper);

    value = lookup == null ? upper : lookup;

    _mimeName.put(encoding, value);

    return value;

i saw the _mimeName is a HashTable,here is a lock

and here is the 2nd lock

  public static Reader getReadEncoding(InputStream is, String encoding)
    throws UnsupportedEncodingException
    EncodingReader factory = null;
    synchronized (_readEncodingFactories) {
      factory = _readEncodingFactories.get(encoding);

      if (factory == null) {
        try {
          String javaEncoding = Encoding.getJavaName(encoding);


the _readEncodingFactories is locked


when the server receive too many post requests,this cause slow

i wanna know how to deal with this problem.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
01-07-09 02:27 lookis New Issue
01-29-09 14:55 ferg Assigned To  => ferg
01-29-09 14:55 ferg Status new => closed
01-29-09 14:55 ferg Resolution open => fixed
01-29-09 14:55 ferg Fixed in Version  => 4.0.0

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker