neilwatson has asked for the wisdom of the Perl Monks concerning the following question:

I've turning on slow query logging to help diagnose a slow application. One slow query that is frequently logged is this:

# Time: 060105 7:56:22 # User@Host: rt_user[rt_user] @ localhost [] # Query_time: 34 Lock_time: 0 Rows_sent: 1 Rows_examined: 0 SELECT GET_LOCK('Apache-Session-c3963b50afe4da8f2358a48906c7eaf6'

What exactly is Apache::Session doing here?

Neil Watson
watson-wilson.ca

Replies are listed 'Best First'.
Re: Slow query with Apache::Session
by perrin (Chancellor) on Jan 05, 2006 at 16:32 UTC
    It's asking to lock a session. It probably showed up in the slow queries because this session was already locked and it had to wait. That could mean you have a scoping bug in your code which causes Apache::Session to not release locks.