it turned out the hang up problems (now fixed) were separate from mysql "driver error on query: Commands out of sync" problems.
here is one example on that error from process 609 right after sr restart:
Jun 6 18:22:41 localhost /usr/sbin/sip-router[609]: INFO: db_mysql [km_dbase.c:97]: submit_query(): select username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,domain from location Jun 6 18:22:44 localhost /usr/sbin/sip-router[609]: INFO: db_mysql [km_dbase.c:97]: submit_query(): insert into location (username,contact,expires,q,callid,cseq,flags,cflags,user_agent,received,path,socket,methods,last_modified,domain ) values ('test','sip:test@192.98.101.10:5074;transport=udp','2009-06-06 19:22:44',0.50 ,'ikquzsrapccwsci@localhost',219,0,0,'Twinkle/1.4.2',NULL,NULL,'',6111,'2009-06-06 18:22:44','test.fi') Jun 6 18:22:44 localhost /usr/sbin/sip-router[609]: INFO: db_mysql [km_dbase.c:97]: submit_query(): select id,src_addr,dst_addr,body,ctype,inc_time from silo where username='test' AND domain='test.fi' AND snd_time=0 order by id Jun 6 18:22:44 localhost /usr/sbin/sip-router[609]: ERROR: db_mysql [km_dbase.c:118]: driver error on query: Commands out of sync; you can't run this command now Jun 6 18:22:44 localhost /usr/sbin/sip-router[609]: ERROR: <core> [db_query.c:101]: error while submitting query Jun 6 18:22:44 localhost /usr/sbin/sip-router[609]: ERROR: msilo [msilo.c:1007]: failed to query database
as you see, there is first select on location, then insert on location (save) and finally select on msilo (m_dump) that causes the error.
any idea how it is possible that insert (which does not return result) could cause following select to return this kind of error?
i have not experienced these kind of errors in k with the same config and modules. could it be that there is a bug in srdb1 lib?
-- juha
On Sat, June 6, 2009 5:41 pm, Juha Heinanen wrote:
[..] Jun 6 18:22:44 localhost /usr/sbin/sip-router[609]: INFO: db_mysql [km_dbase.c:97]: submit_query(): select id,src_addr,dst_addr,body,ctype,inc_time from silo where username='test' AND domain='test.fi' AND snd_time=0 order by id Jun 6 18:22:44 localhost /usr/sbin/sip-router[609]: ERROR: db_mysql [km_dbase.c:118]: driver error on query: Commands out of sync; you can't run this command now Jun 6 18:22:44 localhost /usr/sbin/sip-router[609]: ERROR: <core> [db_query.c:101]: error while submitting query Jun 6 18:22:44 localhost /usr/sbin/sip-router[609]: ERROR: msilo [msilo.c:1007]: failed to query database
as you see, there is first select on location, then insert on location (save) and finally select on msilo (m_dump) that causes the error.
any idea how it is possible that insert (which does not return result) could cause following select to return this kind of error?
i have not experienced these kind of errors in k with the same config and modules. could it be that there is a bug in srdb1 lib?
Hello Juha,
during my tests i did not observed this error, but i don't used msilo. So far the mysql driver and the srdb1 part seems to work ok in my experience. I found one problem in the db_postgres driver with srdb1, but was not able to found a reason for this so far, as it happened only in some cases. I need to setup the testcases for this again.
Henning
On 08-06 10:57, Juha Heinanen wrote:
Henning Westerholt writes:
during my tests i did not observed this error, but i don't used msilo.
i have read msilo code many times and don't find anything wrong with it.
-- juha
Neither could I find anything. Please try again with the debugging patch that I sent you in a separate email and send the log output either to me privately or to the list.
thanks, Jan.
2009/6/9 Jan Janak jan@iptel.org:
Neither could I find anything. Please try again with the debugging patch that I sent you in a separate email and send the log output either to me privately or to the list.
such an error occurred in OpenSIPS and the cause was a module (xcap_client) which did a bad initialization for MySQL. The module was just loaded, but not used at all. Anyway it caused the error "driver error on query: Commands out of sync" when other modules used the database.
On 09-06 12:33, Iñaki Baz Castillo wrote:
2009/6/9 Jan Janak jan@iptel.org:
Neither could I find anything. Please try again with the debugging patch that I sent you in a separate email and send the log output either to me privately or to the list.
such an error occurred in OpenSIPS and the cause was a module (xcap_client) which did a bad initialization for MySQL. The module was just loaded, but not used at all. Anyway it caused the error "driver error on query: Commands out of sync" when other modules used the database.
Juha does not even load the module.
Jan.
2009/6/9 Jan Janak jan@iptel.org:
On 09-06 12:33, Iñaki Baz Castillo wrote:
2009/6/9 Jan Janak jan@iptel.org:
Neither could I find anything. Please try again with the debugging patch that I sent you in a separate email and send the log output either to me privately or to the list.
such an error occurred in OpenSIPS and the cause was a module (xcap_client) which did a bad initialization for MySQL. The module was just loaded, but not used at all. Anyway it caused the error "driver error on query: Commands out of sync" when other modules used the database.
Juha does not even load the module.
Yes I know. What I mean is that, just by having loaded a buggy module is enough to cause this MySQL issue in other modules.
On 09-06 12:59, Iñaki Baz Castillo wrote:
2009/6/9 Jan Janak jan@iptel.org:
On 09-06 12:33, Iñaki Baz Castillo wrote:
2009/6/9 Jan Janak jan@iptel.org:
Neither could I find anything. Please try again with the debugging patch that I sent you in a separate email and send the log output either to me privately or to the list.
such an error occurred in OpenSIPS and the cause was a module (xcap_client) which did a bad initialization for MySQL. The module was just loaded, but not used at all. Anyway it caused the error "driver error on query: Commands out of sync" when other modules used the database.
Juha does not even load the module.
Yes I know. What I mean is that, just by having loaded a buggy module is enough to cause this MySQL issue in other modules.
Of course, this is because mysql connections are shared across modules and this particular problem is related to a mysql connection being in a wrong state when a select is to be executed.
Jan.