2018-08-05, 04:15 PM
(2018-08-05, 02:41 PM)tkurki Wrote:@ tkurki: It looks like this:(2018-06-15, 08:29 PM)e-sailing Wrote: I had the same problem run.log "accept failed for connection to signalk: Too many open files"
I think it has to do with kplex.
If I attach a gps to kplex it needs 8 open files all the time.
If I now disconnect the gps and reboot. Every half minute it adds 1 open file untill the limit of the linux system is reached. Then SignalK fires errors until the disk is full.
To test it: Find the pid of kplex
"ps aux | grep kplex"
print out the counted open files of the pid (replace pid with the process number you got from last command) with
"ls /proc/pid/fd/ | wc -l"
What are the open files? ls -l /proc/pid/fd/
Sent from my iPhone using Tapatalk
Code:
pi@openplotter:~ $ ps aux | grep kplex
pi 4057 0.1 0.0 26724 524 pts/0 Sl+ 14:40 0:00 kplex
pi 4143 0.0 0.0 4372 564 pts/1 S+ 14:40 0:00 grep --color=auto kplex
pi@openplotter:~ $ ls /proc/4057/fd
0 1 2 3 4 5 6
pi@openplotter:~ $ ls /proc/4057/fd
0 1 2 3 4 5 6 7
pi@openplotter:~ $ ls /proc/4057/fd
0 1 2 3 4 5 6 7
pi@openplotter:~ $ ls /proc/4057/fd
0 1 2 3 4 5 6 7 8
pi@openplotter:~ $ ls /proc/4057/fd
0 1 10 2 3 4 5 6 7 8 9
pi@openplotter:~ $
This is the same issue as http://forum.openmarine.net/showthread.php?tid=1355.
If kplex doesn't get any sentence it can't send anything. SignalK waits ca 30 seconds for information from kplex and then thinks the connection is down and doesn't close it. It just opens a new connection. This does happen until there are ca 1000 open connections.
I can't tell if it is a communication problem with kplex or signalk.
A solution could be to disable kplex.
But if there is a device, which is offline most of the time we can't disable kplex without losing functionality.
Another solution is to send a dummy sentence to keep kplex and signalk happy.