in reply to Re: Apache::Session problems under high load
in thread Apache::Session problems under high load

We tried it, and MySQL gets the writes, but locking still does not happen. We have tested this on the command line and it doesn't lock. It also fails with ::File

I forked 3 LWP::useragent requests to a script that used Apache::ssionmanager or apache::session to store some data. if locking worked, all 3 sets of data should be in the session at the end, but only one or two were.

I've got `00's of lines of test script if you are keen!!! -TDG
  • Comment on Re^2: Apache::Session problems under high load

Replies are listed 'Best First'.
Re^3: Apache::Session problems under high load
by borisz (Canon) on Oct 27, 2004 at 14:13 UTC
    Perhaps you think in the wrong direction, the session is written when you untie the session. So if request 1 takes longer as request 2, r2 is written correct with locking, but is overwritten by request 1. assuming both use the same session_id
    Boris
      We tried a hack to force flush to disk as early as possible but this broke everything so we stopped. We do try to untie as early as possible. Should I paste in the test scripts? They are a mess, admittedly, as they were thrown together from bits and pieces to prove a point.

      It really looks like locking really fails for us in the scripts.
        I think even more that you think wrong on the locking issue. Try to add a Transaction => 1 to your tie, this is more likely what you want.
        Boris
Re^3: Apache::Session problems under high load
by perrin (Chancellor) on Oct 27, 2004 at 17:10 UTC
    It definitely does lock. The locking behavior varies somewhat by subclass. If you can tell us what Apache::Session subclass you are using and show us the test code you tried, we can probably tell you what's going wrong.