[mod_python] Reloading PSP sometimes shows old pages

Graham Dumpleton graham.dumpleton at gmail.com
Mon Mar 30 02:09:08 EDT 2009


2009/3/30 Mike Mueller <mike at subfocal.net>:
> On Mon, Mar 30, 2009 at 04:47:02PM +1100, Graham Dumpleton wrote:
>> 2009/3/30 Mike Mueller <mike at subfocal.net>:
>> > Good point, here's the exact situation:
>> >
>> > Page1.psp and Page2.psp both include common.psp, using the <%@include %>
>> > syntax.  common.psp has the navigation menu and other common page
>> > contents, in a function called gen_header().  I was changing the code of
>> > this function, while reloading a window pointed at Page1.psp (or
>> > Page2.psp).
>> >
>> > Yes, the problem occurs with MaxRequestsPerChild 1.
>> > (And I restarted apache after setting this.)
>>
>> If MaxRequestsPerChild is 1 then it can't be a caching problem within
>> mod_python.
>>
>> What is the actual URL path (don't care about host), are you relying
>> on additional path information passed to the request or query string
>> arguments?
>>
>> Do you connect your browser direct to that Apache instance or do you
>> go via some firewall proxy/cache? Do you have any sort of caching
>> enabled in Apache?
>>
>> Graham
>
> The URL has no query string, it's just http://host:81/~mike/test/page.psp.
> No POST parameters or anything, a very simple page.
>
> No proxy.  Browser is on the same host as Apache.  As I said in the
> first email, no caching in Apache, as far as I can tell.  (I grepped
> around the config files looking for any caching that might've been
> enabled by default, and came up empty.)
>
> The more I play with it, the more I think it may just be Firefox that
> sucks.  The bouncing-between-versions only happens in it.  I thought
> Opera had it because the first time I loaded my page in Opera, I got an
> old version (several versions prior) of the page.  That was before
> changing MaxRequestsPerChild.  But I haven't seen that in Opera since.
>
> Opera's only problem is that reload doesn't always update to latest...
> sometimes I have to navigate away and come back, or it'll keep showing
> me the version it has loaded.  (I've tried various combos of shift,
> ctrl+shift, etc. while clicking reload).
>
> Also, after a certain length of time (a minute or two?), both browsers
> simply load the latest version, with no weird old versions appearing.
>
> This is frustrating.

All I can suggest is that log using req.log_error() from the PSP page
and include in the response of the page, both the date/time and the
process ID.

Logging will help to verify if page actually being processed. It being
in the page should make it easier to verify that data is actually
changing or not. If that part of data changes but remainder of page
doesn't then would have to be a caching issue with mod_python and
MaxRequestsPerChild isn't working.

See if that shows any pattern. Logically every request should have a
different date/time and pid if MaxRequestsPerChild is set to 1.

Graham



More information about the Mod_python mailing list