[OpenSIPS-Users] OpenSIPS 2.4.4, db_postgres.so number of connections

Alexey Kazantsev kurgan-rus at inbox.ru
Tue Feb 26 02:47:35 EST 2019

Hi list!

OpenSIPS 2.4.4 (x86_64/linux).
CentOS 7.6.1810.

   # we increased this value from default "2"
   modparam("db_postgres", "max_db_queries", 20)
   modparam("db_postgres", "exec_query_threshold", 60000)

   modparam("acc",            "db_url", "postgres://user:PaSs@pg-server/db")
   modparam("avpops",      "db_url", "postgres://user:PaSs@pg-server/db")
   modparam("dispatcher", "db_url", "postgres://user:PaSs@pg-server/db")
   modparam("clusterer",    "db_url", "postgres://user:PaSs@pg-server/db")

My colleague noticed an interesting behavior with PG DB connection.

'netstat -tulpan | grep %pg-server-ip%' showed only 1 ESTABLISHED connection.

When we configured 5432 port explicitly for the 'acc' module (which uses the DB
most actively) ...

   modparam("acc", "db_url", "postgres://user:PaSs@pg-server:5432/db")

... we saw several dozens of connections.

And the load on the workers also decreased after that.
Is it a bug?

BR, Alexey

More information about the Users mailing list