[Serdev] CVS:commitlog: sip_router/modules/domain domain.c
Atle Samuelsen
clona at cyberhouse.no
Fri Jan 26 10:54:42 UTC 2007
Hi,
* Hendrik Scholz <hendrik.scholz at freenet-ag.de> [070126 11:33]:
> Hi!
>
> There is another issue inside the domain module.
> Inside mod_init() the database connection is established but even if
> everything is loaded successfully the connection is torn down before
> regular operation.
> As a result the RPC domain.reload will fail.
> Two solutions:
>
> 1) remove disconnect_db() from mod_init()
> 2) call connect_db() whenever needed, i.e. in reload_domains() from RPC
>
> I'm no friend of persistent but unused MySQL connections which
> might introduce issues later down the road (closed remotely by MySQL
> et al). I'd go for the connection re-establishments upon need and
> teardown afterwards.
>
> Any comments?
On a general basis.. go for option 2. I've personally had problems with
SER some time back, that the database disconnected some of the mysql
connections due to too no traffic for X hours, and ser did'nt realize
it.. and then just did'nt enter anything into the db. (it sorted itself
out, when I got some more traffic)
And, it's not many days ago I debugged the same problem in a java server
for some friends, where the database disconnected and the client still
tought it was connected...
- Atle
>
> Cheers,
> Hendrik
>
> --
> freenet Cityline GmbH, Hamburger Chaussee 2-4, 24114 Kiel, Germany
> Phone: +49 (0)431 9020552, Fax: +49 (0)431 9020559
> Internet: http://www.freenet.de, eMail: hendrik.scholz at freenet-ag.de
> _______________________________________________
> Serdev mailing list
> Serdev at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serdev
More information about the Serdev
mailing list