It's a really strange problem. I believe it to be a server issue, but it's so strange and hard to reproduce that I'm not entirely sure.

Just as the title says I'm receiving responses for earlier requests. And not just from the same client.

I'm developing an iPhone app with a server component. The server is running apache2, mod_wsgi, and a django webapp.

All responses are JSON, all POSTs are made with JSON as the request raw body, and all requests wrapped in SSL.

For instance I may make a request to /login/ and receive a perfectly good response. Later I may make a request to /registration/ and receive a JSON dictionary with a registration failed response (even though it doesn't really fail) along with key/values for data returned in the previous /login/ request! Sometimes a key/value pair will be returned for up to 5 requests later.

And this is happening between app launches. I even had this happen in a browser with a request I had previously made from the app. In this instance a made a GET request for a user profile and received the JSON response for an earlier login attempt (without any of the data expected for the current request).

As I shot in the dark, I have disabled memcache and turned off Keep-Alive. Other than disabling Keep-Alive I'm just running a default ubuntu apache configuration.

Restarting Apache appears to temporarily fix it in most cases.

Any help is appreciated!

  • 1
    Can you provide an example request/response? On the face of it I'd say it sounds like an issue in the application code, as opposed to any kind of caching within the web server. Feb 1, 2012 at 20:43
  • If restarting Apache fixes it then it seems to be on the server side. Do you use varnish or a CDN that would be caching responses?
    – Peter
    Oct 13, 2012 at 20:36

1 Answer 1


Could you solve this issue? I currently have the same problem rather frequently. I run a Tomcat connected to an Apache via AJP. Sometimes all requests work properly, sometimes most/all requests receive previous responses instead of beeing served by Tomcat. Apache logs look fine, Tomcat seems to never receive these requests and doesn't log anything.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .