Yes. It's a problem with the way the new MySQL was written in its defaults. When 5.0.x came around, they defaulted to timing out the connections. There's a fix, but it ONLY works on MySQL 5.0.19 and above (they implemented the fix around 5.0.12, but it didn't work until 5.0.19).

IF you have 5.0.19 and above, I've attached a patched my_con.c file (goes in $SER-SRC/modules/mysql). Recompile with the new file and it should work (I've added an option to reconnect on timeout).

Let me know if you have any questions concerning its implementation.

N.



Kostas Marneris wrote:
Hello all,

Has anyone experience a similar problem with SER-0.9.6 and MySQL 5.0.x ?

The problem also appears even if we don't restart the MySQL server
but just wait with SER "up & running" for some time.

Any feedback or ideas ?


thanks
Kostas

Kostas Marneris wrote:
  
Greetings to the list,

In a previous thread
(http://lists.iptel.org/pipermail/serusers/2006-April/027961.html)
SER and mysql 5.0 issues were discussed. The main idea was that if MySQL was
restarted, SER should be able to do auto-reconnect to the database server.
According to the thread (Jan Janak), the latest SER version
(0.9.6) should contain a fix to the problem.

However, we recently upgraded MySQL from version 4.1 to 5.0 as part of an upgade
of Debian Sarge to Etch in our servers. We had no problems with SER and MySQL 4.1.
We recompiled SER and linked mysql module with the MySQL 5 client library
(libmysqlclient.so.15). The auto-reconnect problem seems to persist.

We start MySQL, then SER and after a few SIP clients get registered,
we restart the MySQL server (using Debian init scripts).
We then see the following  messages in ser's log:
./ser[24006]: submit_query(): MySQL server has gone away
./ser[24006]: db_insert: Error while submitting query
./ser[24006]: db_insert_ucontact(): Error while inserting contact
./ser[24006]: insert_ucontact(): Error while inserting in database


Our SER config contains the following lines:

fifo_db_url="mysql://ser:XXXXXX@localhost/ser"

# --------------------------------------------------------------------
# Modules Section
# --------------------------------------------------------------------
...
loadmodule "/opt/ser-0.9.6/lib/ser/modules/mysql.so"
loadmodule "/opt/ser-0.9.6/lib/ser/modules/usrloc.so"
loadmodule "/opt/ser-0.9.6/lib/ser/modules/uri_db.so"
...
modparam("usrloc", "db_url", "mysql://ser:XXXXXX@localhost/ser")
modparam("uri_db", "db_url", "mysql://ser:XXXXXX@localhost/ser")
...

Our MySQL version is 5.0.32 (standard Debian etch packages) and we
have compiled ourselves the latest stable SER version (0.9.6).

Any comments are highly welcome, since we are thinking of deploying a
large scale SER setup.


thanks,
Kostas


    
_______________________________________________
Serusers mailing list
Serusers@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers