Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-09-06 Thread Daniel-Constantin Mierla
Hello, On 9/5/11 4:55 PM, MÉSZÁROS Mihály wrote: Hello Daniel, Thank You, and many thanks to Alex too! The fix you made is working fine for me. thanks for testing. Cheers, Daniel -- Daniel-Constantin Mierla -- http://www.asipto.com Kamailio Advanced Training, Oct 10-13, Berlin:

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-09-05 Thread MÉSZÁROS Mihály
Hello Daniel, Thank You, and many thanks to Alex too! The fix you made is working fine for me. Cheers, Misi ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-31 Thread Daniel-Constantin Mierla
Hello, thanks for investigating further. I just committed a patch, pull the latest GIT and try again. Let me know if works ok. Thanks, Daniel On 8/30/11 9:58 AM, MÉSZÁROS Mihály wrote: So the problem is that rank: 0 PROC_MAIN process initialitzed and have db connection with mod_child_init,

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-31 Thread MÉSZÁROS Mihály
Hi Daniel, Thank You for your reply! - if (!ul_dbh) - ul_dbh = ul_dbf.init(db_url); /* Get a new database connection */ + ul_dbh = ul_dbf.init(db_url); /* Get a database connection per child */ Are you sure that it will not cause any problem that rank -1 process in

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-31 Thread Daniel-Constantin Mierla
Hello, On 8/31/11 10:49 AM, MÉSZÁROS Mihály wrote: Hi Daniel, Thank You for your reply! - if (!ul_dbh) - ul_dbh = ul_dbf.init(db_url); /* Get a new database connection */ + ul_dbh = ul_dbf.init(db_url); /* Get a database connection per child */ Are you sure that

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-31 Thread MÉSZÁROS Mihály
2011-08-31 12:18 keltezéssel, Daniel-Constantin Mierla írta: Hello, On 8/31/11 10:49 AM, MÉSZÁROS Mihály wrote: Hi Daniel, Thank You for your reply! - if (!ul_dbh) - ul_dbh = ul_dbf.init(db_url); /* Get a new database connection */ + ul_dbh = ul_dbf.init(db_url);

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-30 Thread MÉSZÁROS Mihály
So the problem is that rank: 0 PROC_MAIN process initialitzed and have db connection with mod_child_init, and after rank 0 PROC_MAIN process is forking for tcp workers it contains the initialized ul_dbh and no unique connection created for the tcp workers. Any suggestion, solution? Thanks,

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-29 Thread MÉSZÁROS Mihály
Hi, Your patch didn't work for me. The kamailio didn't start if i use if ( _rank != PROC_MAIN) So i commented out, both if statement, and now out of sync problem disappeared --- a/modules_k/usrloc/ul_mod.c +++ b/modules_k/usrloc/ul_mod.c @@ -355,8 +355,11 @@ static int child_init(int _rank)

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-29 Thread Alex Hermann
On Monday 29 August 2011, MÉSZÁROS Mihály wrote: Your patch didn't work for me. The kamailio didn't start if i use if ( _rank != PROC_MAIN) So i commented out, both if statement, and now out of sync problem disappeared That should do the trick, but it might be possible to create a zombie

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-29 Thread MÉSZÁROS Mihály
Hi, Thank You Alex for your help! Others? Daniel? Can You please help me? Thanks, Misi 2011-08-29 13:09 keltezéssel, Alex Hermann írta: On Monday 29 August 2011, MÉSZÁROS Mihály wrote: Your patch didn't work for me. The kamailio didn't start if i use if ( _rank != PROC_MAIN) So i commented

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-29 Thread Alex Hermann
On Monday 29 August 2011, MÉSZÁROS Mihály wrote: I am experiencing that in usrloc module, still more then one worker process share the same sql connection: I'm sorry, the first patch was totally bogus. Due to the forking of the childs, they have the same memory layout and a very high chance

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-29 Thread MÉSZÁROS Mihály
Hi, I find the following: grep con: 17212 Aug 29 17:05:27 hal /usr/sbin/kamailio[24001]: INFO: db_mysql [km_dbase.c:83]: submit_query: con: 17212 table: location query: insert into location

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-29 Thread MÉSZÁROS Mihály
Hi, With this debug i can see that all tcp connections are using the same db connection(18549). Any suggestion highly appreciated! Please read collected information on the bottom of my email. Misi --- a/modules_k/usrloc/Makefile +++ b/modules_k/usrloc/Makefile @@ -8,12 +8,16 @@ include

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-28 Thread Daniel-Constantin Mierla
Hello, thanks for investigation - this is only on current devel version. For quick try, can you revert the patch and try? Practically, you have to replace: while( mysql_more_results(CON_CONNECTION(_h)) mysql_next_result(CON_CONNECTION(_h)) 0 ) { with: while( mysql_next_result(

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-28 Thread Alex Hermann
On Saturday 27 August 2011, MÉSZÁROS Mihály wrote: I am using the git version of kamailio, and i am experiencing problem This message is repeated in log with all kind of mysql query (insert/delete/select) http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html Can you try to

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-28 Thread MÉSZÁROS Mihály
Hello, After reverting back to original this commit, the problem is still occurring. :( So not this commit is causing the problem. :( Misi 2011-08-28 09:25 keltezéssel, Daniel-Constantin Mierla írta: Hello, thanks for investigation - this is only on current devel version. For quick try,

Re: [SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-28 Thread Alex Hermann
On Sunday 28 August 2011, MÉSZÁROS Mihály wrote: I attached the log file. If you need detailed log/higher log level, then please let me know. usrloc seems to be using the same connection from multiple processes: pid: 18389 and 18391, connection: 0xb7387d5c Aug 28 12:40:10 hal

[SR-Users] db_mysql Commands out of sync; you can't run this command now

2011-08-27 Thread MÉSZÁROS Mihály
Hi, I am using the git version of kamailio, and i am experiencing problem This message is repeated in log with all kind of mysql query (insert/delete/select) Aug 27 22:04:05 hal /usr/sbin/kamailio[25681]: ERROR: db_mysql [km_dbase.c:124]: driver error on query: Commands out of sync; you