i2pd
i2pd copied to clipboard
Log flooded with `Too many open files`
I ran a 24/7 i2pd server along with other services. Recently I found the / is out of space and it turns out that /var/log/i2pd/i2pd.log
is flooded with
17:50:11@33/error - NTCP2: Accept error Too many open files
17:50:11@33/error - NTCP2: Accept error Too many open files
17:50:11@33/error - NTCP2: Accept error Too many open files
17:50:11@33/error - NTCP2: Accept error Too many open files
17:50:11@33/error - NTCP2: Accept error Too many open files
17:50:11@33/error - NTCP2: Accept error Too many open files
17:50:11@33/error - NTCP2: Accept error Too many open files
17:50:11@33/error - NTCP2: Accept error Too many open files
17:50:11@33/error - NTCP2: Accept error Too many open files
and that takes ~9G to store such thing. Maybe there should be a mechanism to prevent log flooding.
show prlimit --pid <pid_of_i2pd>
maybe reconfigure logrotate?
maybe reconfigure logrotate?
It's different, about logging.
even if ulimit -n 131072
set, error 17:17:05@442/error - NTCP2: Runtime exception: open: Too many open files [system:24]
still appear
Are you starting with systemd?
This occurs for me on OpenBSD too, so not necessarily systemd related:
$ uname -a
OpenBSD xxx 7.1 GENERIC.MP#465 amd64
$ pkg_info |grep i2pd
i2pd-2.41.0 client for the I2P anonymous network
It does not seem to make a difference the openfiles limit either:
$ cat /etc/login.conf.d/i2pd.conf
i2pd:\
:openfiles=4096:
This occurs for me on OpenBSD too, so not necessarily systemd related:
$ uname -a OpenBSD xxx 7.1 GENERIC.MP#465 amd64 $ pkg_info |grep i2pd i2pd-2.41.0 client for the I2P anonymous network
It does not seem to make a difference the openfiles limit either:
$ cat /etc/login.conf.d/i2pd.conf i2pd:\ :openfiles=4096:
Please contact package maintainer in your system to increase that limit in package and prevent such behavior for other users.
I had the same problem with flooding logs with "Accept error Too many open files". i2pd version 2.44.0 in Devuan 4 Chimaera (based on Debian 11 Bullseye).
Fix: edit /etc/default/i2pd
, default value is:
# If you have problems with hunging i2pd, you can try enable this
ulimit -n 4096
Increase the value.
Then restart the service: sudo service i2pd restart
.
https://github.com/PurpleI2P/i2pd/commit/737603e81b9b33b1b25fb4a501930dcfffb50016 + https://github.com/PurpleI2P/i2pd/commit/857df5c7341353e8b18af812829797c4da3ccb84