I think I’ve found some extra information regarding the login problem,
at least while using Apache::Session::File on my (Mac OS X server, perl
5.8.6) system. After doing a bunch of debugging, I’ve found that
Apache::Session gets itself in a state where it can’t get a write lock
on the session file. Apache::Session doesn’t error check it’s flock
calls, so it happens silently.
I found this post on perlmonks that suggested manual calls to DESTROY
can help the problem:
so I put one near the end of autohandler.
However, when I did this, the server just hung. Looking into the
Apache::Session::File code, I found that it’s trying to get an
exclusive lock and it’s blocking when trying to write. So I hacked it on
our dev system to just return when it can’t get the lock. After doing
that, my log has a bunch of these:
[warning]: Unable to get exclusive lock (Resource temporarily
unavailable). Moving along… at
I then added a call to release_all_locks, thinking it might help in the
final write to the session file.
After these hacks, I did get the multiple login issue to go away. But, I
still get several of the above warnings on the initial page load.
I don’t consider this a true fix since I’m not sure of the repercussions
of manually releasing the locks, but I think it demonstrates that part
of the problem is in Apache::Session::File (or the file system itself)
somewhere. The only information I could find to indicate what’s
happening is that something isn’t playing nice with the file locks. And
I can’t explain why it appears to resolve itself after a few logins. Is
there something special happening on the first login that triggers these
I’m sorry I can’t present a solution, but I hope this might help move
toward a fix or workaround.
Administrative Computing Services
University at Buffalo