OSError: [Errno 24] Too many open files [closed]
I have trouble on my Raspberry pi 4. People counter script crash every too day.
This i have in my lxterminal on user pi:
Traceback (most recent call last):
File "people_counter.py", line 146, in <module>
File "people_counter.py", line 19, in send_osc
File "/home/pi/.virtualenvs/py3cv3/lib/python3.7/site-packages/osc4py3/as_eventloop.py", line 149, in osc_udp_client
File "/home/pi/.virtualenvs/py3cv3/lib/python3.7/site-packages/osc4py3/as_eventloop.py", line 230, in _select_monitor
File "/home/pi/.virtualenvs/py3cv3/lib/python3.7/site-packages/osc4py3/oscscheduling.py", line 167, in create_platform_socket_monitor
File "/home/pi/.virtualenvs/py3cv3/lib/python3.7/site-packages/osc4py3/oscscheduling.py", line 681, in init
File "/home/pi/.virtualenvs/py3cv3/lib/python3.7/site-packages/osc4py3/oscscheduling.py", line 612, in init
File "/home/pi/.virtualenvs/py3cv3/lib/python3.7/site-packages/osc4py3/oscscheduling.py", line 637, in create_monitor_sockets
File "/usr/lib/python3.7/socket.py", line 151, in init
OSError: [Errno 24] Too many open files
In User limit i have this config:
ulimit -a
ulimit -a выдает такие конфиги:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 28771
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 500000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 95
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 28771
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Can you post line 151?
sounds unrelated to opencv
We need send "id's" to server who listen osc ( udp ) port. We not use OpenCV for sound.
In 151 to 161 line i have this code:
your opencv code does not use any file handles there, but osc (using sockets) does.
opencv does not deal with audio at all.
let me close this.
please debug your osc code for leaks, and raise an issue with the appropriate maintainer, thank you.
Ok! I write osc4py3 module developer.
That is not an error in line 19. We are looking at line 151...Too many open files. I was looking at config that you re stating that
open files (-n) 500000
. You set to 4096 or higher. I used to set between 4096 to 65355 for tcp. If this doen't work your limit. Then reduce to 128.This what I have on Raspberry pi 3/3b/4: