Re: [Sqlrelay-discussion] current connections counter in scaler
Brought to you by:
mused
|
From: Renat S. <sr...@st...> - 2011-06-29 02:36:00
|
On 29.06.2011 01:00, David Muse wrote: > Wouldn't it be better if the sqlr-connection processes increment and > decrement the value in the shm in all cases, and the scaler just reads > the value from the shm? The code would be simpler. > It was done this way before the "fork" patch and cause counter to dispair with reality when sqlr-connection dies with SIGSEGV, for example. I saw situations when scaler would not start new connection because it would think that many connections were already started but there were none. > The only issue I could see with that is if the sqlr-connections are > killed with a SIGKILL, then they would fail to decrement the counter, > though I think the same thing would happen if the scaler were > incrementing and decrementing the counter. If you kill a process with > SIGKILL, does it create a zombie until the parent waits on it? If scaler would be responsible for the counter, it would increment after fork and decrement in reapChildren in all and every cases. It would be more stable scaling system. |