[OpenSIPS-Devel] ERROR:db_mysql:db_mysql_submit_query

Iñaki Baz Castillo ibc at aliax.net
Wed Dec 3 23:39:31 CET 2008


El Miércoles, 3 de Diciembre de 2008, Iñaki Baz Castillo escribió:
> El Miércoles, 3 de Diciembre de 2008, Iñaki Baz Castillo escribió:
> > Do you mean that I should enabled the mysql query log? I've already
> > enabled it and will check it.
>
> Well, the issue has occurred right now and I've verified that when the
> following error occurs there is no SQL query (I expect MySQL server has
> rejected the query so it doesn't log it):
>
> [6133] ERROR:db_mysql:db_mysql_submit_query: driver error on query:
> Commands out of sync; you can't run this command now
> [6133] ERROR:core:db_do_query: error while submitting query
> [6133] ERROR:auth_db:get_ha1: failed to query database
>
> The error occurs with INVITE, SUBSCRIBE...

buffff, too much complex: "sometimes" it occurs all the time, sometimes it 
doesn't occur. I've realized of the following:

All the time I monitorize the number of mysql connections. Unfortunatelly 
it's a testing server with just two users (presence and so). 

When the error doesn't occur I see:

~# mysqladmin processlist
+------+-------+-----------+----------+---------+------+-------+------------------+
| Id   | User  | Host      | db       | Command | Time | State | Info             |
+------+-------+-----------+----------+---------+------+-------+------------------+
| 1941 | sip   | localhost | opensips | Sleep   | 8    |       |                  |
| 1949 | root  | localhost |          | Query   | 0    |       | show processlist |
+------+-------+-----------+----------+---------+------+-------+------------------+

Just one SQL connection.

After a while, I see the error related to MySQL query in xlog (after really few SIP 
traffic, basically presence). Now the number of SQL connections has been 
increased:

+------+-------+-----------+----------+---------+------+-------+------------------+
| Id   | User  | Host      | db       | Command | Time | State | Info             |
+------+-------+-----------+----------+---------+------+-------+------------------+
| 1950 | sip   | localhost | opensips | Sleep   | 142  |       |                  |
| 1952 | sip   | localhost | opensips | Sleep   | 11   |       |                  |
| 1953 | sip   | localhost | opensips | Sleep   | 10   |       |                  |
| 1956 | sip   | localhost | opensips | Sleep   | 40   |       |                  |
| 1957 | root  | localhost |          | Query   | 0    |       | show processlist |
+------+-------+-----------+----------+---------+------+-------+------------------+


The error remains happening, and the number of connections to MySQL remains increasing.


Even if there is no SIP traffic for a long interval, the number of SQL connections 
is never decreased, **no one connection is ended**. Isn't dangerous?

But it seems that each time the error occurs, a new SQL connection is created (not 
100% sure anyway).


Well, with this data (not enough of course, but I can't get more), what would be the 
next step in rder to debug it?

PD: As I already said, I use MySQL 5.0.32-7etch6 (Debian Etch in 64 bits).

Thanks.


-- 
Iñaki Baz Castillo



More information about the Devel mailing list