Hi Henning and Daniel
Indeed, the command you gave me helped. As I interpret it, the update pua was the last transaction, that does not "free" the last transaction. Acc. MySQL tutorial "[...] This can happen, for example, if you are using mysql_use_result() and try to execute a new query before you have called mysql_free_result(). It can also happen if you try to execute two queries that return data without calling mysql_use_result() or mysql_store_result() in between.".
Jul 30 19:31:47 [10640] DBG:mysql:db_mysql_submit_query: submit_query(): select expires from pua where pres_uri='sip:dell@10.96.115.129' AND pres_id='' AND flag=128 AND event=1 Jul 30 19:31:47 [10640] DBG:mysql:db_mysql_submit_query: submit_query(): update pua set expires=1217439268,cseq=0,etag='a.1217428805.10638.264.43',desired_expir es=1217439267 where pres_uri='sip:dell@10.96.115.129' AND pres_id='' AND flag=128 AND event=1 Jul 30 19:31:47 [10640] DBG:core:db_free_rows: freeing 1 rows Jul 30 19:31:47 [10640] DBG:core:db_free_rows: row[0]=0x818bc00 Jul 30 19:31:47 [10640] DBG:core:db_free_rows: 0x818bc00=pkg_free() RES_ROWS Jul 30 19:31:47 [10640] DBG:pua:db_update: NO_UPDATEDB_FLAG Jul 30 19:31:47 [10640] DBG:mysql:db_mysql_submit_query: submit_query(): delete from pua where expires<1217439097 Jul 30 19:31:47 [10640] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 19:31:47 [10640] ERROR:mysql:db_mysql_delete: error while submitting query Jul 30 19:31:47 [10640] ERROR:pua:db_update: while deleting from db table pua Jul 30 19:31:47 [10640] DBG:mysql:db_mysql_submit_query: submit_query(): select username,domain,doc_type,etag,doc_uri,port from xcap where source=1 Jul 30 19:31:47 [10640] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 19:31:47 [10640] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 19:31:47 [10640] ERROR:xcap_client:query_xcap_update: in sql query
Strange though, why it does only happen after some time running, and not before. E.g. the same things are performed clearly some time before:
Jul 30 16:45:05 [10640] DBG:mysql:db_mysql_submit_query: submit_query(): select expires from pua where pres_uri='sip:aastra@10.96.115.129:5060' AND pres_id='' AND flag=128 AND event=1 Jul 30 16:45:05 [10640] DBG:mysql:db_mysql_submit_query: submit_query(): update pua set expires=1217429654,cseq=0,etag='a.1217428805.10638.16.2',desired_expires =1217429684 where pres_uri='sip:aastra@10.96.115.129:5060' AND pres_id='' AND flag=128 AND event=1 Jul 30 16:45:05 [10640] DBG:core:db_free_rows: freeing 1 rows Jul 30 16:45:05 [10640] DBG:core:db_free_rows: row[0]=0x818bc20 Jul 30 16:45:05 [10640] DBG:core:db_free_rows: 0x818bc20=pkg_free() RES_ROWS Jul 30 16:45:05 [10640] DBG:pua:db_update: NO_UPDATEDB_FLAG Jul 30 16:45:05 [10640] DBG:mysql:db_mysql_submit_query: submit_query(): delete from pua where expires<1217429095 Jul 30 16:45:05 [10640] DBG:mysql:db_mysql_submit_query: submit_query(): select username,domain,doc_type,etag,doc_uri,port from xcap where source=1 Jul 30 16:45:05 [10640] DBG:core:db_free_rows: freeing 0 row
Don't know whether somebody can interpret those pieces of information. But as it does not happen always, but only sometimes, maybe an illegitimate interaction with other modules cause it?!
Regards Sebastian
-----Original Message----- From: Henning Westerholt [mailto:henning.westerholt@1und1.de] Sent: Wednesday, 30. July 2008 14:56 To: users@lists.kamailio.org Cc: Schumann Sebastian; miconda@gmail.com Subject: Re: [Kamailio-Users] Error in database module
On Wednesday 30 July 2008, Schumann Sebastian wrote:
I attached parts of the detailed log file, hope you can get some more information from it. I didn't find your patch in the mailing list archives yet :-(
Hi Sebastian,
you could just uncomment the "LM_DBG("submit_query(): %.*s\n", _s->len, _s->s);" line in db_mysql_submit_query in the mysql module, then each query will be logged. But i'm not sure if Daniel referred to this..
Cheers,
Henning