Hi Bogdan,
I found the source of the problem. It is the use of localhost to connect to
local postgresql database.
I changed it to 127.0.0.1 and opensips starts fast and without warnings.
before:
modparam("db_virtual", "db_urls", "postgres://user:pass@localhost/db")
after:
modparam("db_virtual", "db_urls", "postgres://user:[email protected]/db")
There is this warning I don’t understand:
Nov 8 09:52:40 fra-appsrv01 /usr/local/sbin/opensips[12635]:
WARNING:avpops:avpops_db_bind: async() calls for
DB URL [default] will work in normal mode due to driver limitations
And once or twice a day I get timer warnings, but it is way better than it was
before.
Nov 8 09:59:45 fra-appsrv01 /usr/local/sbin/opensips[12640]:
WARNING:core:handle_timer_job: timer job <tm-time
r> has a 70000 us delay in execution
Nov 8 09:59:45 fra-appsrv01 /usr/local/sbin/opensips[12641]:
WARNING:core:handle_timer_job: timer job <blcore-
expire> has a 70000 us delay in execution
Nov 8 18:10:10 fra-appsrv01 /usr/local/sbin/opensips[12640]:
WARNING:core:handle_timer_job: timer job <tm-time
r> has a 60000 us delay in execution
Nov 8 18:10:10 fra-appsrv01 /usr/local/sbin/opensips[12640]:
WARNING:core:handle_timer_job: timer job <db_virt
ual-reconnect> has a 60000 us delay in execution
Nov 8 18:10:10 fra-appsrv01 /usr/local/sbin/opensips[12640]:
WARNING:core:handle_timer_job: timer job <blcore-
expire> has a 60000 us delay in execution
Thanks,
Xaled
From: Bogdan-Andrei Iancu [mailto:[email protected]]
Sent: Friday, November 09, 2018 3:00 PM
To: xaled <[email protected]>; [email protected]
Subject: Re: [OpenSIPS-Users] WARNING:core:utimer_ticker: utimer task
<tm-utimer>
Hi Xaled,
(switching back to the list)
Again, it seems to be related to your postgres server - the backtrace shows
that all opensips procs are stuck while trying to connect to the postgres
server. Why the connect phase takes so long? not sure, it is a postgres stuff.
Try setting this param to 1 or 2:
http://www.opensips.org/html/docs/modules/2.4.x/db_postgres.html#param_timeout
And see how it works.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 11/08/2018 12:14 PM, xaled wrote:
Hi Bogdan,
here is the compiled version from git sources:
root@fra-appsrv01:/usr/local/etc/opensips# /usr/local/sbin/opensips -V
version: opensips 2.4.2 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC,
FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: a9b9169
main.c compiled on 19:30:38 Nov 7 2018 with gcc 4.9.2
and here is the debian repo version:
root@fra-appsrv01:/usr/local/etc/opensips# /usr/sbin/opensips -V
version: opensips 2.4.2 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC,
FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
main.c compiled on with gcc 4.9.2
Greetings,
Xaled
From: Bogdan-Andrei Iancu [mailto:[email protected]]
Sent: Thursday, November 08, 2018 10:21 AM
To: xaled <mailto:[email protected]> <[email protected]>
Subject: Re: [OpenSIPS-Users] WARNING:core:utimer_ticker: utimer task
<tm-utimer>
Hi Xaled,
What's the exact version / revision of OpenSIPS you are using ?
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 11/08/2018 01:44 AM, xaled wrote:
Hi Bogdan,
Is there something you can recommend to debug and fix it?
The database is in the same VM as opensips and there are never time out
warnings during the actual database access. Warnings come either at startup, or
randomly if opensips gets through startup phase.
I will take a closer look at the database connection performance. It makes no
sense to me though, that warning flood started after migrating the opensips VM
to a newer hardware without changing anything else and then partially stopped
after using compiled version of opensips vs installed from Debian repo on the
same VM.
The older Debian VM with the same opensips/db setup on a different physical
server does not have the startup warning flood at all. Only random warning
during run time.
Appreciate your time,
Xaled
On Nov 7, 2018 22:18, Bogdan-Andrei Iancu <mailto:[email protected]>
<[email protected]> wrote:
Hi Xaled,
As I suspected, all the worker processes in OpenSIPS are blocked in the
startup sequence (so called child_init routine) trying to connect to the
postgres database. This is holding up without rejecting or accepting the
connection from OpenSIPS.
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users