Phoenix.pm: Apache::Session::Lock::File under mod_perl
Doug Miles
doug.miles at bpxinternet.com
Wed Jan 15 15:22:41 CST 2003
Andrew Johnson wrote:
> Doug Miles wrote:
>
>> Anyone out there using Apache::Session::File and
>> Apache::Session::Lock::File under mod_perl? The problem I am having
>> is that Apache::Session::Lock::File is aparently not releasing the
>> exclusive lock when the tied hash goes out of scope. I can get a
>> simple test program to work from the command line, but when I try it
>> under mod_perl, it locks on the tie to the existing session. If I
>> delete the lock file, it works fine. Any ideas?
>>
>
> Sounds like the lock is persisting because the Apache process that
> created the lock still exists. Are you sure the part of the code where
> you're calling release_write_lock() or release_read_lock() is actually
> being run?
Yeah, the process still exists, but I was executing a release_all_locks
like this:
my $lock = new Apache::Session::Lock::File;
$lock->release_all_locks($session_id);
after I finished "writing" to the session hash. Now I have an unlink in
the same place, and that works. That kind of defeats the purpose of
having a lock though. :)
More information about the Phoenix-pm
mailing list