[OpenSIPS-Users] db_mysql:db_mysql_submit_query: driver error on query: Commands out of sync; you can't run this command now

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Oct 6 11:28:45 CEST 2008


Hi David,

The "Commands out of sync; you can't run this command now" is generated 
by mysql driver when you try to do nested queries - pushing a second 
command without fetching the result from the first one.

In opensips, there is one DB connection per process, so all the modules 
will use the same DB connection for their queries. So, if a bogus module 
places the query and "forgets" to read the result, the next module 
trying to use the DB connection will spit this error.

What modules are you using?

Regards,
Bogdan

David Loh wrote:
> Hi Guys,
>
> Ever since OpenSIPS 1.4.0 onward, I've encountered this problem in 
> very regular manner. I've updated to lastest 1.4.2 but this problems 
> still persist.
>
> If I recalled correctly, previously there's several mails highlighted 
> this problem, and some of us actually suggested add a LM_DBG to the .c 
> file and recompile, so that we could get the SQL statement, I've tried 
> with earlier (1.4.1) and it does show some normal SQL, doesn't cause 
> any problem if I entered it on MySQL console/command prompt, but 
> whenever these SQL send through OpenSIPS (db_mysql or db), it always 
> gave error "command out of sync", sometimes even occurred during 
> authentication in REGISTER. Tried to patch the .c code in 1.4.2 but it 
> doesn't show the exact SQL so can't paste it out, I guess all I can do 
> is provide error log.
> ------------------------------------------------------------------------
> Sep  2 15:08:17 DvidRnD /sbin/opensips[6457]: 
> ERROR:db_mysql:db_mysql_submit_query: driver error on query: Commands 
> out of sync; you can't run this command now
> Sep  2 15:08:17 DvidRnD /sbin/opensips[6457]: ERROR:core:db_do_query: 
> error while submitting query
> Sep  2 15:08:17 DvidRnD /sbin/opensips[6457]: 
> ERROR:rls:get_resource_list: while querying table xcap for 
> [uri]=sip:david at MY_IP
> Sep  2 15:08:17 DvidRnD /sbin/opensips[6457]: 
> ERROR:rls:rls_handle_subscribe: while attepmting to get a resource list
> Sep  2 15:08:17 DvidRnD /sbin/opensips[6457]: 
> ERROR:rls:rls_handle_subscribe: occured in rls_handle_subscribe
> ------------------------------------------------------------------------
>
> Is anyone come across this, and with a fix for it? Appreciate if any 
> of you can share the solution, thanks in advance.
>
>
> Regards,
> David Loh
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list