Hi Federico,
Thanks for the info, good contribution. Unfortunately the DB conns are
not the only issue here. When talking about 1200 processes, the overall
memory, file descriptors and other may become a bottleneck too
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS Bootcamp 2020 online
https://opensips.org/training/OpenSIPS_eBootcamp_2020/
On 11/3/20 4:39 PM, Federico Edorna wrote:
If it helps, we are using pgbouncer <https://www.pgbouncer.org/> to
avoid opening a lot of connections to db. Pgbouncer acts as a db
server for opensips with full workers connections and opens just a few
(on demand) to real db server. It helps a lot when you have
backup/standby opensips, not increasing those db connections.
On Tue, Nov 3, 2020 at 9:13 AM Bogdan-Andrei Iancu
<bog...@opensips.org <mailto:bog...@opensips.org>> wrote:
Maybe we should consider (as future extension) the possibility to
bundle
multiple UDP listeners on the same worker. In this case, we can
have a
large number of listeners with a relatively small number of workers/
processes.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS Bootcamp 2020 online
https://opensips.org/training/OpenSIPS_eBootcamp_2020/
On 11/3/20 10:10 AM, Răzvan Crainea wrote:
> Hello!
>
> No, there is no way to prevent OpenSIPS from opening connections
for
> each process. Did you try to start opensips with fewer workers, for
> example just 1, or 3? Does it start properly?
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
> On 11/2/20 1:55 PM, M S wrote:
>> Thank you Bogdan. I actually use: socket=udp:*:5060 in config file.
>> Is there a way to not open a process per interface, to not have
1200
>> or 600 workers? as I said in my previous email, I tried auto
scaling
>> and it didn't work.
>> Also, I have increased MySQL max connections but it didn't fix
>> the problem - I wonder if anybody has experience with this...
>>
>> Thanks!
>>
>> On Mon, Nov 2, 2020 at 9:24 AM Bogdan-Andrei Iancu
>> <bog...@opensips.org <mailto:bog...@opensips.org>
<mailto:bog...@opensips.org <mailto:bog...@opensips.org>>> wrote:
>>
>> Hi OpenSIPer,
>>
>> With 600 interfaces (btw , have actually listed the 600
sockets into
>> the cfg or pointed the socket to the interface?) with 2
workers per
>> socket -> 1200 workers / processes. That means 1200
connections to
>> your DB server, which may be a bottle neck (by default, mysql
>> accepts around 100 simultaneous connections).
>>
>> I suspect your mysql server cannot cope with the 1200 conn,
>> preventing OpenSIPS to properly start.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>> https://www.opensips-solutions.com
>> OpenSIPS Bootcamp 2020 online
>> https://opensips.org/training/OpenSIPS_eBootcamp_2020/
>>
>> On 11/2/20 1:23 AM, M S wrote:
>>> Hi all,
>>> I have a machine with 600 subinterfaces. when I start opensips
>>> with 2 udp workers per interface, it doesn't start and keeps
>>> restarting.
>>> First error message was about too many connections to
Mysql which
>>> I fixed by increasing max_connections, but now I am getting:
>>>
>>> ERROR:db_mysql:db_mysql_new_connection: initial connect failed
>>> ERROR:core:db_do_init: could not add connection to the pool
>>> ERROR:sql_cacher:child_init: Cannot connect to SQL DB from
child
>>> ERROR:core:init_mod_child: failed to initializing module
>>> sql_cacher, rank 683
>>> ERROR:core:send_status_code: write(-1) failed (-1): 32,
Broken pipe
>>> ERROR:core:udp_start_processes: failed to send -1 status code
>>> ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't
connect
>>> to local MySQL server through socket
'/var/lib/mysql/mysql.sock'
>>> (11)
>>>
>>> and:
>>>
>>> ERROR:core:send_status_code: write(-1) failed (-1): 32,
Broken pipe
>>> ERROR:core:udp_start_processes: failed to send -1 status code
>>>
>>> Any ideas how I can fix this?
>>> Also, can I just limit number of opensips forked
processes, to run
>>> just a certain number process instead of x numbers per
interface?
>>> I tried using auto_scaling but it did not help. in my
>>> opensips.conf, I have:
>>> socket=udp:*:5060
>>> and adding an autoscaling profile in front of it seems to
limit
>>> the processes per interface again, not all...
>>>
>>> Any help is appreciated.
>>>
>>> Thanks!
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users@lists.opensips.org <mailto:Users@lists.opensips.org>
<mailto:Users@lists.opensips.org <mailto:Users@lists.opensips.org>>
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users@lists.opensips.org <mailto:Users@lists.opensips.org>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
> _______________________________________________
> Users mailing list
> Users@lists.opensips.org <mailto:Users@lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org <mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users