Thanks Alex,
it looks like we'll have to move to mysql in that case (we are much more experienced in postgres). Is this feature expected to be added for db_postgres?
Regards
Javi
Message: 6 Date: Tue, 04 Jan 2011 11:54:20 -0500 From: Alex Balashov abalashov@evaristesys.com Subject: Re: [SR-Users] Reconnection to db To: sr-users@lists.sip-router.org Message-ID: 4D2350BC.8080207@evaristesys.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 01/04/2011 09:46 AM, Javier Gallart wrote:
Hi list
we have been testing the mtree module. We do periodical reloads of the mtree table with the "mi mt_reload" command through xmlrpc. It works fine except when the db is restarted. If we manually restart the db and then try the mt_reload commands we get this error: Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: ERROR: db_postgres [km_dbase.c:152]: 0xa6a490 PQsendQuery Error: server closed the connection unexpectedly#012#011This probably means the server terminated abnormally#012#011before or while processing the request.#012 Query: select partition,prefix,route from trees order by partition Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: ERROR: <core> [db_query.c:101]: error while submitting query Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: ERROR: mtree [mtree_mod.c:622]: Error while querying db Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: ERROR: mtree [mtree_mod.c:738]: cannot re-load info from database
Is there a way to reconnect to the db before sending that command?
Failure to automatically reconnect to Postgres is one of the distinguishing features of db_postgres in contrast to db_mysql for the moment.
-- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
End of sr-users Digest, Vol 68, Issue 7
Hello,
the code for reconnecting to postgress is in the module, but implemented only for v2 of DB API. However, kamailio originated modules implement v1 of DB API. Will be pretty easy to update DB API v1 for a devel that uses postgress. I do not have such devel environment setup, but if i find time I will make a patch if others are willing to test.
Cheers, Daniel
On 1/4/11 7:44 PM, Javier Gallart wrote:
Thanks Alex,
it looks like we'll have to move to mysql in that case (we are much more experienced in postgres). Is this feature expected to be added for db_postgres?
Regards
Javi
Message: 6 Date: Tue, 04 Jan 2011 11:54:20 -0500 From: Alex Balashov <abalashov@evaristesys.com <mailto:abalashov@evaristesys.com>> Subject: Re: [SR-Users] Reconnection to db To: sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> Message-ID: <4D2350BC.8080207@evaristesys.com <mailto:4D2350BC.8080207@evaristesys.com>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 01/04/2011 09:46 AM, Javier Gallart wrote: > Hi list > > we have been testing the mtree module. We do periodical reloads of the > mtree table with the "mi mt_reload" command through xmlrpc. It works > fine except when the db is restarted. If we manually restart the db and > then try the mt_reload commands we get this error: > Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: > ERROR: db_postgres [km_dbase.c:152]: 0xa6a490 PQsendQuery Error: server > closed the connection unexpectedly#012#011This probably means the server > terminated abnormally#012#011before or while processing the request.#012 > Query: select partition,prefix,route from trees order by partition > Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: > ERROR: <core> [db_query.c:101]: error while submitting query > Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: > ERROR: mtree [mtree_mod.c:622]: Error while querying db > Jan 4 09:13:17 server /usr/local/kamailio-3.1.1/sbin/kamailio[28534]: > ERROR: mtree [mtree_mod.c:738]: cannot re-load info from database > > Is there a way to reconnect to the db before sending that command? Failure to automatically reconnect to Postgres is one of the distinguishing features of db_postgres in contrast to db_mysql for the moment. -- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/ ------------------------------ _______________________________________________ sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users End of sr-users Digest, Vol 68, Issue 7 ***************************************
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users