tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: question : encounter java.net.SocketTimeoutException: Read timed out occasionally
Date Mon, 13 Oct 2008 11:10:55 GMT

----- Original Message ----- 
From: "James Wang" <wangwenpin@gmail.com>
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 <john@kewlstuff.co.za> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message