Hi all,
we've been having the same Exception and Stack Trace in an application we've
written for a customer. Our application is running on Tomcat 5.5.25 accessed
through Apache with ModJk.

The Exception occurs when a client accesses the server with a slow
connection and plenty of data is posted to the server during the request.
The request parameters contained in the posted data are null when we try to
access them in our java code.

What we'll test next is to increase the keep-alive timeout of Apache and see
if that helps. The downside of this being trouble if there are many Clients
accessing the server at the same time.

Another solution according to other posts in other forums might be an
upgrade to tomcat 6. 

If the clients access the tomcat-server directly without apache in front of
it, the error does not occur at all, so it seems to have something to do
with modJK. Plus - in our case - the error has nothing to do with IE (for a
change).

Just wanted to let you know...

Cheers,
Alex



Johnny Kewl wrote:
> 
> 
> ----- Original Message ----- 
> From: "James Wang" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Sent: Monday, October 13, 2008 11:35 AM
> Subject: Re: question : encounter java.net.SocketTimeoutException: Read 
> timed out occasionally
> 
> 
>> Hi Johnny,
>>
>> Yes, We are using ajax to make the post requests, and the header do 
>> include
>> content-length information that was calculated by ajax automatically, but
>> the
>> strange thing is sometime it get stuck at the begin of uploading http 
>> body(0
>> byte
>> was transfered always in this case) until AJP connector timeout, actually 
>> we
>> have revised a little bit on tomcat source code, below is our finding we
>> made
>> the change on org.apache.catalina.connector.Request.java for your 
>> reference
>> :
>>
>> protected void parseParameters() {
>>
>>    :      :       :      :
>>    :      :       :      :
>>
>>                if (actualLen == len) {
>>                    parameters.processParameters(formData, 0, len);
>>                }
>>                else { // added by me
>>                    context.getLogger().error("formData Len error len :" +
>> len + " <> actualLen :" + actualLen);
>>                }
>>            } catch (Throwable t) {
>>                context.getLogger().warn
>>                    (sm.getString("coyoteRequest.parseParameters"), t);
>>            }
>>        }
>>
>>    }
>>
>> Following was the Tomcat log, actualLen always return 0,
>> the first line showing the content-length is 32 but the returned
>> actual length is 0.
>>
>> SEVERE: formData Len error len :32 <> actualLen :0
>> SEVERE: formData Len error len :379 <> actualLen :0
>> SEVERE: formData Len error len :32 <> actualLen :0
>> SEVERE: formData Len error len :41 <> actualLen :0
>> SEVERE: formData Len error len :60 <> actualLen :0
>> SEVERE: formData Len error len :74 <> actualLen :0
>> SEVERE: formData Len error len :145 <> actualLen :0
>> SEVERE: formData Len error len :60 <> actualLen :0
>>
>> Thanks & Best Regards.
>> James Wang
>> On Mon, Oct 13, 2008 at 4:34 PM, Johnny Kewl <[EMAIL PROTECTED]>
>> wrote:
> 
> James... dont know... couple of thing you can do... get wire shark and 
> actually watch whats on the wire... if the header is coming in and no body 
> is sent, it aint tomcat...
> My Ajax is stale... if you doing it yourself, then its very like a 
> javascript issue.... cant remember details but its not unusual in the Ajax 
> stuff to see...
> ... if(IE) do it all different...
> ... I think you working on the wrong side... its that Ajax, is my
> guess....
> 
> My guess is that it works with Firefox perfectly... but not on IE and you 
> dont have a debugger for that... welcome to Javascript ;) on diff browsers 
> its a nightmare ;)
> Good luck, or maybe post the Ajax snippet and see if the guys can spot
> it...
> 
> ---------------------------------------------------------------------------
> HARBOR : http://www.kewlstuff.co.za/index.htm
> The most powerful application server on earth.
> The only real POJO Application Server.
> See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
> ---------------------------------------------------------------------------
> If you cant pay in gold... get lost...
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/question-%3A-encounter-java.net.SocketTimeoutException%3A-Read-timed-out-occasionally-tp19326602p19993182.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to