[Serusers] REGISTER attempt when db is down
yserge
yserge at newxt.com
Wed Oct 26 23:35:10 CEST 2005
On Wed, 2005-10-26 at 22:35 +0200, Jan Janak wrote:
> On 26-10-2005 15:33, yserge wrote:
> > With recently changed behavior of MySQL the reconnection scheme of SER
> > ( and I am running SER 0.9.4 and MySQL 5.0.13 ) would no longer work..
> > It's OK, that can be fixed with slight correction of MySQL configuration
> > or with minor change in SER code..
>
> Could you elaborate on this ?
Sure, my understanding is that starting from MySQL version 5.0.6 ( or
around that ) the default behavior of MySQL has changed and once the
connection has timed out on inactivity, it could not longer be
reused/reconnected. Between MySQL 5.0.6 and 5.0.12 the only way to beat
that was to explicitly set up a property "wait_timeout" to something
very high ( like 10000000) in my.cnf file. That's what I was doing in my
case.
Since MySQL version 5.0.13 the behavior can be controlled and you can
enable reconnection by explicitly calling mysql_set_server_option() with
a new MYSQL_OPT_RECONNECT option.. ( and that is what I meant by "minor
change in SER code" )
If neither thing is done, then with MySQL 5.0.6 or later, once
disconnected on timeout, it looked like SER would never reconnect.
>
> > What I noticed though is that if the database does go down, the REGISTER
> > request does not get any response, while I would expect SER to still
> > send something like 500 Internal Server Error.. I wonder if it's a SER
> > bug or a routing script issue..
>
> This is indeed a bug. Can you reproduce it and send me any relevant
> error messages from syslog ?
Sure. I'll send it to you.
thanks,
Sergei
More information about the sr-users
mailing list