Too many open files in system - IOException

starter2 years ago

My Server is Crash,The first i need to is to restart the server in order to make it running again because i can't even access the server when this happened and when i check i have the following error messages from traccar logs

2022-12-05 23:59:58 WARN: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in
the pipeline did not handle the exception. - Too many open files in system - IOException (...)
2022-12-05 23:59:59 WARN: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in
the pipeline did not handle the exception. - Too many open files in system - IOException (...)

You Can refer to the screenshot below for my open files setting based on this reference link https://www.traccar.org/optimization/

https://postimg.cc/WqFfKCHf

fyi, I run traccar server with Docker and i did this optimization config in the beginning when i setup the traccar server

Please Advice

Thanks in advance

Anton Tananaev2 years ago

How many open connections do you have?

starter2 years ago

Hi Anton,

Thanks For Your Reply

are you talking about this ?

[root@traccar-server ~]# netstat -an|grep ESTABLISHED | grep -w 5023 | wc -l
2489
[root@traccar-server ~]# netstat -an|grep ESTABLISHED | grep -w 5027 | wc -l
1
[root@traccar-server ~]# netstat -an|grep ESTABLISHED | wc -l
5036
[root@traccar-server ~]# netstat -ant | awk '{print $6}' | sort | uniq -c | sort -n
      1 established)
      1 Foreign
     10 CLOSE_WAIT
     12 TIME_WAIT
     14 FIN_WAIT2
     72 LISTEN
   5049 ESTABLISHED

Additional information if needed :

[root@traccar-server ~]# cat /proc/sys/fs/file-max
250000
[root@traccar-server ~]# cat /proc/sys/fs/file-nr
27136   0       250000

Thanks in advance

Anton Tananaev2 years ago

That's a significant number, but shouldn't be a problem if everything is configured correctly. You must be hitting some limit somewhere.