<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-7" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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). <br>
<br>
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). <br>
<br>
Let me know if you have any questions concerning its implementation. <br>
<br>
N.<br>
<br>
<br>
<br>
Kostas Marneris wrote:
<blockquote cite="mid:46484A8E.9090904@otenet.gr" type="cite">
  <pre wrap="">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 &amp; running" for some time.

Any feedback or ideas ?


thanks
Kostas

Kostas Marneris wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Greetings to the list,

In a previous thread
(<a class="moz-txt-link-freetext" href="http://lists.iptel.org/pipermail/serusers/2006-April/027961.html">http://lists.iptel.org/pipermail/serusers/2006-April/027961.html</a>)
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


    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
Serusers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Serusers@lists.iptel.org">Serusers@lists.iptel.org</a>
<a class="moz-txt-link-freetext" href="http://lists.iptel.org/mailman/listinfo/serusers">http://lists.iptel.org/mailman/listinfo/serusers</a>
  </pre>
</blockquote>
<br>
</body>
</html>