[CDBI] Use with mod_perl caching question
rs at plusw.de
Thu Dec 13 17:51:02 GMT 2007
On Thursday 13 December 2007 18:20:01 Perrin Harkins wrote:
> On Dec 13, 2007 11:50 AM, Berg, Eric <eric.berg at lehman.com> wrote:
> > The problem that I'm having is that my cdbi mods in some of the apache
> > instances are returning stale data in response to these requests.
> If you're using InnoDB, check your isolation level as described here:
> If not try turning off the object index:
> - Perrin
I had a similar problem recently with CDBI an my mod_perl app. I had a page
with lots of dynamically created images on it, some images depending on the
content of my session. The session is written (to Postgres) with "Select for
update" (Apache::Session) , yet, since CDBI recommends AutoCommit=>1 this is
completely ineffective. Normally this doesn't matter, but here a lot of
parallel requests led to some requests reading an "old" state of the session
or even overwriting the state of the "main" request (SessionAlwaysWrite=>1 ).
I think the same problem can happen with any data written to the database when
you have asynchronous AJAX requests.
More information about the ClassDBI