roxen.lists.roxen.general

Subject Author Date
RE: database timeouts? Henrik_Grubbström <grubba[at]roxen[dot]com> 17-02-2006
On Fri, 17 Feb 2006, Henrik Grubbström wrote:

> On Fri, 17 Feb 2006, Graeme Davis wrote:
>
>> It hangs the whole server and I have a script that will kill -USR1 
>> backtrace
>> & restart Roxen when it's hung.  Looking at some of the debug logs, it 
>> seems
>> like most threads are hung on destroy() calls.   But it's hung on calls to
>> my local MySQL dbs which I know are up, so something is causing everything
>> to hang.... Could it be the create() call that locks stuff?
>
> The locking has probably been done in DBManager.pmod, which means that the 
> lock is held for a too long time.
[...]
> Ok, to me the above looks like thread 14 has taken the sq_cache_lock, and 
> thread 11 (and others) hang waiting for it.
>
> A possible work around could be to start the server with -DNO_DB_REUSE.
>
> A proper fix would probably involve letting DBManager.sql_cache_get() release 
> the sq_cache_lock during the call to get_sql_handler().

A tentative fix is now in cvs for Roxen 4.0 and 4.5.

>> Thanks a lot,
>> 
>> Graeme

--
Henrik Grubbström					<grubba[at]roxen.com>
Roxen Internet Software AB