Dear all
I use OpenSER with the perl extension to publish presence states for non-SIMPLE/PUBLISH capable devices using an outbound proxy. My idea is to send all SIP messages to an outbound-proxy, that forwards them to the respective registrar/SIP proxy. The outbound proxy uses SIP messages (INVITE, BYE, CANCEL...) as triggers to call a perl script that publishes the presence state to a presence agent using PUA_MI.
Currently, registrar, presence agent and the publishing functionality are hosted on one machine. But I think that should not have any impact on the whole idea...
All what I wanted to do works fine so far, except that after some time, I get MySQL errors. The Perl script does not use the database, only from OpenSER script, actions are called. I posted below some of the error messages I receive and after, the part of my config performing database queries. Does anyone see a obvious mistake in there? I tried OpenSER lastest branch and current trunk, both produce the error after some time.
Thanks for your help!
Sebastian
Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:pua:db_update: while querying db table pua Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:xcap_client:query_xcap_update: in sql query Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_delete: error while submitting query Jul 30 11:07:30 [4329] ERROR:presence:update_db_subs: deleting expired information from database Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:presence:msg_watchers_clean: querying database for expired messages Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:presence:msg_presentity_clean: querying database for expired messages Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:pua:db_update: while querying db table pua Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:xcap_client:query_xcap_update: in sql query Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_delete: error while submitting query Jul 30 11:09:10 [4329] ERROR:presence:update_db_subs: deleting expired information from database Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:presence:msg_watchers_clean: querying database for expired messages Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:presence:msg_presentity_clean: querying database for expired messages
203 if (uri==myself) { 204 if (method=="REGISTER") { 205 # Uncomment this if you want to use digest authentication 206 if (!www_authorize("IP", "subscriber")) { 207 www_challenge("IP", "0"); 208 exit; 209 }; 210 211 # query if dialog exists for registering URI 212 avp_delete("*"); 213 if (avp_db_query("SELECT from_uri, 214 to_uri 215 FROM dialog 216 WHERE from_uri='$tu' or to_uri='$tu' or from_uri='$tu:5060' or to_uri='$tu:5060'")) { 217 #xlog("L_INFO", ">>> Dialog active: caller=$avp(i:1) callee=$avp(i:2)\n"); 218 } else { 219 #xlog("L_INFO", ">>> No Dialog active: avp_db_query() returned no records\n"); 220 }; 221 xlog("L_INFO", ">>>>>>>>> REGISTER received ($tu)\n"); 222 if(!is_avp_set("$avp(i:1)")) { # no call active for registering to_uri user 223 xlog("L_INFO", ">>>>>>>>> PUBLISHED\n"); 224 perl_exec("publish"); 225 } else { 226 xlog("L_INFO", ">>>>>>>>> NOT PUBLISHED, call active\n"); 227 } 228 save("location"); 229 exit; 230 } 231 232 if(is_method("SUBSCRIBE|PUBLISH")) { 233 if(is_method("PUBLISH")) { 234 if($si == "IP") { 235 if (!t_newtran()) { 236 sl_reply_error(); 237 exit; 238 }; 239 handle_publish(); 240 t_release(); 241 } else { 242 sl_send_reply("488","Not Acceptable Here"); 243 } 244 } else if(is_method("SUBSCRIBE")) { 245 if (!proxy_authorize("", "subscriber")) { 246 proxy_challenge("", "1"); 247 exit; 248 }; 249 handle_subscribe(); 250 t_release(); 251 }; 252 exit; 253 }; 252 exit; 253 }; 254 255 lookup("aliases"); 256 257 # native SIP destinations are handled using our USRLOC DB 258 if (!lookup("location")) { 259 sl_send_reply("404", "Not Found"); 260 exit; 261 } else { 262 append_hf("P-hint: usrloc applied\r\n"); 263 if(method=="INVITE") { 264 # Store Dialog in db 265 setflag(5); 266 # Session timer 267 setflag(6); 268 if (sstCheckMin("1")) { 269 xlog("L_ERR", "422 Session Timer Too Small reply sent.\n"); 270 exit; 271 } 272 xlog("L_INFO", ">>>>>>>>> INVITE received ($fu busy)\n"); 273 perl_exec("publish"); 274 } 275 }; 276 };
Hello Sebastian,
On 07/30/08 10:52, Schumann Sebastian wrote:
Dear all
I use OpenSER with the perl extension to publish presence states for non-SIMPLE/PUBLISH capable devices using an outbound proxy. My idea is to send all SIP messages to an outbound-proxy, that forwards them to the respective registrar/SIP proxy. The outbound proxy uses SIP messages (INVITE, BYE, CANCEL...) as triggers to call a perl script that publishes the presence state to a presence agent using PUA_MI.
Currently, registrar, presence agent and the publishing functionality are hosted on one machine. But I think that should not have any impact on the whole idea...
All what I wanted to do works fine so far, except that after some time, I get MySQL errors. The Perl script does not use the database, only from OpenSER script, actions are called. I posted below some of the error messages I receive and after, the part of my config performing database queries. Does anyone see a obvious mistake in there? I tried OpenSER lastest branch and current trunk, both produce the error after some time.
Thanks for your help!
Sebastian
Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:pua:db_update: while querying db table pua Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:xcap_client:query_xcap_update: in sql query Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_delete: error while submitting query Jul 30 11:07:30 [4329] ERROR:presence:update_db_subs: deleting expired information from database Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:presence:msg_watchers_clean: querying database for expired messages Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:presence:msg_presentity_clean: querying database for expired messages Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:pua:db_update: while querying db table pua Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:xcap_client:query_xcap_update: in sql query Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_delete: error while submitting query Jul 30 11:09:10 [4329] ERROR:presence:update_db_subs: deleting expired information from database Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:presence:msg_watchers_clean: querying database for expired messages Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:presence:msg_presentity_clean: querying database for expired messages
203 if (uri==myself) { 204 if (method=="REGISTER") { 205 # Uncomment this if you want to use digest authentication 206 if (!www_authorize("IP", "subscriber")) { 207 www_challenge("IP", "0"); 208 exit; 209 }; 210 211 # query if dialog exists for registering URI 212 avp_delete("*"); 213 if (avp_db_query("SELECT from_uri, 214 to_uri 215 FROM dialog 216 WHERE from_uri='$tu' or to_uri='$tu' or from_uri='$tu:5060' or to_uri='$tu:5060'")) { 217 #xlog("L_INFO", ">>> Dialog active: caller=$avp(i:1) callee=$avp(i:2)\n"); 218 } else { 219 #xlog("L_INFO", ">>> No Dialog active: avp_db_query() returned no records\n"); 220 }; 221 xlog("L_INFO", ">>>>>>>>> REGISTER received ($tu)\n"); 222 if(!is_avp_set("$avp(i:1)")) { # no call active for registering to_uri user 223 xlog("L_INFO", ">>>>>>>>> PUBLISHED\n"); 224 perl_exec("publish"); 225 } else { 226 xlog("L_INFO", ">>>>>>>>> NOT PUBLISHED, call active\n"); 227 } 228 save("location"); 229 exit; 230 } 231 232 if(is_method("SUBSCRIBE|PUBLISH")) { 233 if(is_method("PUBLISH")) { 234 if($si == "IP") { 235 if (!t_newtran()) { 236 sl_reply_error(); 237 exit; 238 }; 239 handle_publish(); 240 t_release(); 241 } else { 242 sl_send_reply("488","Not Acceptable Here"); 243 } 244 } else if(is_method("SUBSCRIBE")) { 245 if (!proxy_authorize("", "subscriber")) { 246 proxy_challenge("", "1"); 247 exit; 248 }; 249 handle_subscribe(); 250 t_release(); 251 }; 252 exit; 253 }; 252 exit; 253 }; 254 255 lookup("aliases"); 256 257 # native SIP destinations are handled using our USRLOC DB 258 if (!lookup("location")) { 259 sl_send_reply("404", "Not Found"); 260 exit; 261 } else { 262 append_hf("P-hint: usrloc applied\r\n"); 263 if(method=="INVITE") { 264 # Store Dialog in db 265 setflag(5); 266 # Session timer 267 setflag(6); 268 if (sstCheckMin("1")) { 269 xlog("L_ERR", "422 Session Timer Too Small reply sent.\n"); 270 exit; 271 } 272 xlog("L_INFO", ">>>>>>>>> INVITE received ($fu busy)\n"); 273 perl_exec("publish"); 274 } 275 }; 276 };
there seems to be a module which does not free the DB result, maybe in some error case. Could you spot other error message before those messages in the openser logs, maybe you can get a hint? Not sure I remember correctly, but I think I sent a patch with some extra log messages to identify such situation. The affected process seems to be the timer.
Cheers, Daniel
Hi Daniel
Thanks for your mail. Apparently, I only checked the users list but on the devel list there was already discussion about this. It seems mine has also to do with the presence module, as the error occurs first time after a publish has been received.
Strange is that after some errors for PUBLISH, e.g. REGISTER is performed normally and also the location table seems to be updated.
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 :-(
Thanks Sebastian
-----Original Message----- From: Daniel-Constantin Mierla [mailto:miconda@gmail.com] Sent: Wednesday, 30. July 2008 11:39 To: Schumann Sebastian Cc: users@lists.openser.org Subject: Re: [Kamailio-Users] Error in database module
Hello Sebastian,
On 07/30/08 10:52, Schumann Sebastian wrote:
Dear all
I use OpenSER with the perl extension to publish presence states for non-SIMPLE/PUBLISH capable devices using an outbound proxy. My idea is
to send all SIP messages to an outbound-proxy, that forwards them to the respective registrar/SIP proxy. The outbound proxy uses SIP messages (INVITE, BYE, CANCEL...) as triggers to call a perl script that publishes the presence state to a presence agent using PUA_MI.
Currently, registrar, presence agent and the publishing functionality are hosted on one machine. But I think that should not have any impact
on the whole idea...
All what I wanted to do works fine so far, except that after some time, I get MySQL errors. The Perl script does not use the database, only from OpenSER script, actions are called. I posted below some of the error messages I receive and after, the part of my config performing database queries. Does anyone see a obvious mistake in there? I tried OpenSER lastest branch and current trunk, both produce the error after some time.
Thanks for your help!
Sebastian
Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:pua:db_update: while querying db table
pua
Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:xcap_client:query_xcap_update: in sql
query
Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_delete: error while submitting query Jul 30 11:07:30 [4329] ERROR:presence:update_db_subs: deleting expired
information from database Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:presence:msg_watchers_clean: querying database for expired messages Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:07:30 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:07:30 [4329] ERROR:presence:msg_presentity_clean: querying database for expired messages Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:pua:db_update: while querying db table
pua
Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:xcap_client:query_xcap_update: in sql
query
Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_delete: error while submitting query Jul 30 11:09:10 [4329] ERROR:presence:update_db_subs: deleting expired
information from database Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:presence:msg_watchers_clean: querying database for expired messages Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_submit_query: driver error: Commands out of sync; you can't run this command now Jul 30 11:09:10 [4329] ERROR:mysql:db_mysql_query: error while submitting query Jul 30 11:09:10 [4329] ERROR:presence:msg_presentity_clean: querying database for expired messages
203 if (uri==myself) { 204 if (method=="REGISTER") { 205 # Uncomment this if you want to use digest
authentication 206 if (!www_authorize("IP", "subscriber")) { 207 www_challenge("IP", "0"); 208 exit; 209 }; 210 211 # query if dialog exists for registering
URI
212 avp_delete("*"); 213 if (avp_db_query("SELECT from_uri, 214 to_uri 215 FROM dialog 216 WHERE from_uri='$tu' or to_uri='$tu' or from_uri='$tu:5060' or to_uri='$tu:5060'")) { 217 #xlog("L_INFO", ">>> Dialog active: caller=$avp(i:1) callee=$avp(i:2)\n"); 218 } else { 219 #xlog("L_INFO", ">>> No Dialog active: avp_db_query() returned no records\n"); 220 }; 221 xlog("L_INFO", ">>>>>>>>> REGISTER received ($tu)\n"); 222 if(!is_avp_set("$avp(i:1)")) { # no call active for registering to_uri user 223 xlog("L_INFO", ">>>>>>>>> PUBLISHED\n"); 224 perl_exec("publish"); 225 } else { 226 xlog("L_INFO", ">>>>>>>>> NOT PUBLISHED, call active\n"); 227 } 228 save("location"); 229 exit; 230 } 231 232 if(is_method("SUBSCRIBE|PUBLISH")) { 233 if(is_method("PUBLISH")) { 234 if($si == "IP") { 235 if (!t_newtran()) { 236 sl_reply_error(); 237 exit; 238 }; 239 handle_publish(); 240 t_release(); 241 } else { 242 sl_send_reply("488","Not Acceptable Here"); 243 } 244 } else if(is_method("SUBSCRIBE")) { 245 if (!proxy_authorize("", "subscriber")) { 246 proxy_challenge("", "1"); 247 exit; 248 }; 249 handle_subscribe(); 250 t_release(); 251 }; 252 exit; 253 }; 252 exit; 253 }; 254 255 lookup("aliases"); 256 257 # native SIP destinations are handled using our USRLOC DB 258 if (!lookup("location")) { 259 sl_send_reply("404", "Not Found"); 260 exit; 261 } else { 262 append_hf("P-hint: usrloc applied\r\n"); 263 if(method=="INVITE") { 264 # Store Dialog in db 265 setflag(5); 266 # Session timer 267 setflag(6); 268 if (sstCheckMin("1")) { 269 xlog("L_ERR", "422 Session
Timer Too Small reply sent.\n"); 270 exit; 271 } 272 xlog("L_INFO", ">>>>>>>>> INVITE received ($fu busy)\n"); 273 perl_exec("publish"); 274 } 275 }; 276 };
there seems to be a module which does not free the DB result, maybe in some error case. Could you spot other error message before those messages in the openser logs, maybe you can get a hint? Not sure I remember correctly, but I think I sent a patch with some extra log messages to identify such situation. The affected process seems to be the timer.
Cheers, Daniel
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
Hi Henning,
thanks for the hint, I changed it and now I see all the queries. I will check which query(ies) cause the error message. This should help to spot the causing module.
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
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