in reply to Apache::Session problems under high load

Apache::Session has a Lock class for MySQL.
Look: perldoc Apache::Session::Lock::MySQL.
Boris

Replies are listed 'Best First'.
Re^2: Apache::Session problems under high load
by Anonymous Monk on Oct 27, 2004 at 13:48 UTC
    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
      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.
      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.