Re: [Sqlrelay-discussion] listener hang with open database port
Brought to you by:
mused
|
From: Renat S. <sr...@st...> - 2010-05-27 17:10:47
|
27.05.2010 20:04, Cal Heldenbrand ?????:
> #3 0x000000000040486c in scaler::incConnections (this=0x5061f0) at
> scaler.C:502
> 502 if (! semset->wait(8) )
>
Ok, now I see. Scaler waits for new connection to report that it
started. So if connection hangs (or exit) somewhere before calling
signal(8), scaler will never stop waiting.
> void scaler::incConnections()
> {
> /* wait for the connection count to increase. Time out at 10 seconds.
> * Since the login timeout is 5 seconds, this gives a bit of
> buffer time
> */
> if (! semset->waitWithUndo(8, 10, 0) )
> return;
>
I think that the best way is to move incrementing connection counter
somewhere before interacting with db, just after conenction process
starts. May be in init. Or even get rid of semaphore #8 at all in case
of -fork, because scaler already knows if connection starts or not (it
got PID).
--
Renat
|