On Feb 18, 3:02 am, Xurble <[email protected]> wrote:
> Hi,
>
> We have an application that we have been happily using for some time
> using web.py 0.23 and its internal web server.
>
> We have just started the process of migrating it to Apach/mod_wsgi to
> get a little extra performance.
>
> Unfortunately since we have done this we have seen some rather nasty
> caching issues with pages.
>
> It seems that more often than not, the application will serve an old
> page when data is changed under it.
>
> This is happening both in the browser and also using our REST API.
> The fact that it's happening with the API suggests to me that it's
> nothing to do with proper caching behaviour since the client isn't
> sending any etags or 'if-modified-since' headers or similar.
>
> Is this a know issue (maybe with a known solution!!) ? My google
> skills have led me down a blind alley.

If the page is dynamically generated from code and the stale page
represents what was produced by old code, then it is more likely that
you simply haven't restarted Apache, or as appropriate the daemon
processes, such that new code is picked up.

The reason you can see old code if this is not done, is because Apache
on UNIX is a multiprocess web server. Thus your requests can be
hitting older processes which loaded code before you made change.

Have a read of:

  http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading
  http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode

BTW, if using Apache/mod_wsgi and you are not adept at tuning Apache
MPM settings for type of web application being used, then use mod_wsgi
daemon mode as will give you much more predictable behaviour without
you having to fiddle with settings.

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to