Jump to content
Sign in to follow this  
Twarden

How to Fix The Max File Descriptors Error when running Rippled

Recommended Posts

When running rippled on Centos 6 using the yum package, you may encounter this error:

Quote

[WARNING: There are only 1024 file descriptors (soft limit) available, which
limit the number of simultaneous connections.

Or something to the effect that 1024 file descriptors are available and 4096 were requested from rippled, so it shut down.

To fix this error, open /etc/security/limits.conf and at the bottom of the file add:

Quote

 

*                -        nofile         10240

Next, open  /etc/sysctl.conf  and at the bottom of the file add:

Quote

fs.file-max = 65536

Run ulimit -Ha to check if open files has been updated to 10240, such as:

Quote


[root@user rocksdb]# ulimit -Ha
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31806
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 10240
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 31806
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Execute service rippled start and it should operate correctly.

Edited by Twarden

Share this post


Link to post
Share on other sites
2 hours ago, Twarden said:

When running rippled on Centos 6 using the yum package, you may encounter this error:

Or something to the effect that 1024 file descriptors are available and 4096 were requested from rippled, so it shut down.

To fix this error, open /etc/security/limits.conf and at the bottom of the file add:

Next, open  /etc/sysctl.conf  and at the bottom of the file add:

Run ulimit -Ha to check if open files has been updated to 10240, such as:

Execute service rippled start and it should operate correctly.

Thanks for posting that @Twarden.

Share this post


Link to post
Share on other sites
7 hours ago, Twarden said:

To fix this error, open /etc/security/limits.conf and at the bottom of the file add:

Nice post.

However, you should probably increase these limits in a more granular way (so that they only apply to the rippled).

 

Edited by T8493

Share this post


Link to post
Share on other sites
8 hours ago, T8493 said:

Nice post.

However, you should probably increase these limits in a more granular way (so that they only apply to the rippled).

 

You can restrict the nofile setting to a specific user that initiates rippled with:

Quote

rippled_user soft nofile 4096
rippled_user hard nofile 10240

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×