Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
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. –  Shane Madden Feb 1 '12 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 '12 at 20:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.