• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Body of Request occasionally lost

 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Environment:
Solaris11 OS
Glassfish 2.1.1 app server
struts2 framework
A 2-way compression filter is used

Problem:
When requests are sent to the application I work on, it appears that occasionally the body of the POST request is lost. I am lead to believe this because I get reports of errors that generate stack traces that all fail the at the first line of code for the action that relies on the existence of a required request parameter. This appears to happen on multiple (probably all) actions that the application handles. The problem only seems to occur once every few thousand requests or so. In an attempt to narrow down the problem I put some logging into one of the actions that is kicked off if the first required request parameter is null. In this method I attempt to log any relevant values from HttpServletRequest object, all of the http request header, all of the http request parameters, and I try to read the request as a file and write it out to the log file (although I'm not sure I'm doing that right). When I do this, what I see in the log file is that there are no request parameters but the content length is around 20K - 25K. I'm confident that the code that I wrote to write out the request parameters is correct as it works correctly when I try use it with requests that contain data. The code I wrote to write out the request read from a file doesn't seem to work, I've tried different variations but it looks something like this:



Even when there is data in the request, this just writes out:

Starting content:
-1
ending content

I realize this isn't a lot to go on, but I'm not sure where to go with this from here. Does anyone have any ideas on this or suggestions on how to better diagnose the problem? I assume the content-length was computed by the browser and sent in the header, so feel like the fact that I have no parameters indicates that either the content didn't reach the server or that it got garbled along the way (maybe a problem with decompression or decryption?) to the point where glassfish couldn't parse it into request parameters. Let me know if you have any ideas.

Thanks,
Tom
 
Do you want ants? Because that's how you get ants. And a tiny ads:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic