Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] OpenSIPS with large number of interfaces doesn't start #2831

Open
nikbyte opened this issue May 7, 2022 · 17 comments
Open

[BUG] OpenSIPS with large number of interfaces doesn't start #2831

nikbyte opened this issue May 7, 2022 · 17 comments

Comments

@nikbyte
Copy link
Member

nikbyte commented May 7, 2022

Hello OpenSIPS team,

something between 09daaa2 and 64bed63 has happened in 3.1 branch. 09daaa2 with large number of interfaces starts without any issue, but 64bed63 produces next error:

May  7 09:16:36 [3591689] DBG:core:count_module_procs: modules require 1 extra processes
May  7 09:16:36 [-1] ERROR:core:create_ipc_pipes: failed to create IPC sync pipe for process 253, err 24/Too many open files
May  7 09:16:36 [-1] ERROR:core:init_multi_proc_support: failed to create IPC pipes, aborting
May  7 09:16:36 [-1] ERROR:core:main: failed to init multi-proc support
@nikbyte nikbyte added the bug label May 7, 2022
@nikbyte nikbyte added this to the 3.1.10 milestone May 7, 2022
@razvancrainea
Copy link
Member

@nikbyte try bumping your file description limit (ulimit -n) if you're starting from your cli, or bump the LimitNOFILE in your service.

@nikbyte
Copy link
Member Author

nikbyte commented May 18, 2022

@razvancrainea its LimitNOFILE=262144

@ovidiusas
Copy link
Member

ovidiusas commented May 18, 2022 via email

@razvancrainea
Copy link
Member

razvancrainea commented May 20, 2022

After further debugging, @nikbyte figured out that the main issue was that in OpenSIPS 3.1, libmicrohttpd was using the select poll mechanism, which is limited to 1024 file descriptors. Therefore, if other logic (listeners, rtpproxy/rtpengine sockets, db connections, etc) was creating more than 1024 file descriptors, the httpd would no longer work due to this limitation.
A proper fix is to have httpd use a more flexible polling mechanism. I've made an initial patch for this here:
httpd_epoll_3.1.txt
However, this is not complete, as it will not work with older versions of microhttpd, or with systems that do not have epoll - the code would not even compile. That is why we are postponing this until we:

  • run further testing for the new patch
  • exclude the epoll mechanism for system that do not support it (non-linux platforms)
  • disable epoll for libmicrohttpd versions that do not support it

@github-actions
Copy link

github-actions bot commented Jun 5, 2022

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jun 5, 2022
@nikbyte
Copy link
Member Author

nikbyte commented Jun 5, 2022

not stale

@stale stale bot removed the stale label Jun 5, 2022
@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jun 21, 2022
@nikbyte
Copy link
Member Author

nikbyte commented Jun 21, 2022

not stale

@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Jul 20, 2022
@nikbyte
Copy link
Member Author

nikbyte commented Jul 20, 2022

not stale

@stale stale bot removed the stale label Jul 20, 2022
@nikbyte
Copy link
Member Author

nikbyte commented Jul 20, 2022

Attached patch works, however MI answers with significant delay with this...

@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Aug 16, 2022
@nikbyte
Copy link
Member Author

nikbyte commented Aug 16, 2022

still actual

@stale stale bot removed the stale label Aug 16, 2022
@github-actions
Copy link

github-actions bot commented Sep 9, 2022

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Sep 9, 2022
@nikbyte
Copy link
Member Author

nikbyte commented Sep 9, 2022

still actual

@stale stale bot removed the stale label Sep 9, 2022
@github-actions
Copy link

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

@github-actions github-actions bot added the stale label Sep 25, 2022
@nikbyte
Copy link
Member Author

nikbyte commented Sep 25, 2022

still actual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants