1

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!

modfrq
  • 11
  • 1
  • 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 01 '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

1 Answers1

0

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.

Georg
  • 1
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://serverfault.com/help/whats-reputation) you will be able to [comment on any post](https://serverfault.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/525850) – bjoster Jul 21 '22 at 18:34