I've done a lot of research into this over the past couple of months - before I get into the details, my web application is using GWT 2.x running on Tomcat 7, with an Apache httpd 2.2.x and mod_jk 1.2.x setup in front.
With mod_jk version 1.2.26, I'd occasionally see the 'encodedRequest cannot be empty' error in the logs. This would only happen in IE, for me only IE8/9. The problem is that my server OS is Linux, so there's no way that NTLM authentication could be the issue. In newer versions of mod_jk (1.2.37 at this writing), I would instead get a socket timeout and read error in the Tomcat logs.
This error would be logged during a polling of my web application to the server every few seconds in order to get the status of a long-running operation that had been launched in a separate thread. The polling would happen every five seconds, but occasionally it would hang while doing this status request.
After a lot of tcpdump commands, I found that the request that hung would come on a TCP connection that was being reset by Apache; a FIN/ACK was being sent to the browser, the POST request header and body would be received by the server, and the server would continue to reset the connection. Then, strangely enough, only the header would come back to the server from the browser. After researching a little, I found this:
http://stackoverflow.com/questions/4796305/why-does-internet-explorer-not-send-http-post-body-on-ajax-call-after-failure
Apparently, IE will only send the headers during the re-send of the POST request. The GWT servlet hangs trying to reading the POST body and then times out.
In true Microsoft fashion, this issue has actually been know about for a while, a hotfix was issued and installed, but NOT ENABLED on the client machine. If you don't want to force all of your users to edit their registry, you need to either disable HTTP Keep-Alive on your server or increase the Keep-Alive timeout to > 60 seconds. For my apache httpd server, I'm setting KeepAliveTimeout to 65 and MaxKeepAliveRequests to 0 so that the server doesn't initiate connection resets to the browser.
Chris
On Thursday, February 21, 2013 5:27:44 PM UTC-5, GWTFan wrote:
We are also experiencing this problem.We use GWT 2.4 and Glassfish application server.NTLM is specific to Windows, But our app server runs on Linux,Any suggestions on any other probable cause?Appreciate help!
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment