Pay attention to your Steemd API Node's file descriptor settingssteemCreated with Sketch.

in #witness3 years ago (edited)

Hi, every witness and developer !

If you are running a MIRA version Steemd API Node, pay attention to your Linux file descriptor settings.

Currently the MIRA version Steemd API Node's blockchain folder has 33516 files.

# ls -lR blockchain/ | grep "^-" | wc -l
33516

If your system has not enough file descriptor, that will cause the steemd node can not write data to disk.

image.png

Then the node will break down.

You can run these commands to check your file descriptor setting:

# ulimit -Hn
# ulimit -Sn

If you are using Docker as your runtime environment, please execute these commands in the container.

To increase your system file descriptor, edit these two settings in your /etc/security/limits.conf config:

* soft nofile 1024000
* hard nofile 1024000

Then restart your system and check if it works.

If you are using Docker as the runtime environment, you can add --ulimit nofile=1024000:1024000 as the param of docker run.
Example: docker run -itd --name api --ulimit nofile=1024000:1024000 <the_docker_image>.

Also you could edit /etc/sysconfig/dockerand change this line OPTIONS=" — default-ulimit nofile=1024:4096". After saved, restart docker daemon. Then all the docker containers will increase the nofile. ( This method is tested on AWS Linux 2 OS. )

About tuning the RocksDB, it has been put in plan. I will study if it is possible to decrease the number of db files.


Thank you for reading. I'm a witness. You could find more on my site https://steem.fans

I would really appreciate your witness vote! You can vote by AuthSteem. Or open https://steemitwallet.com/~witnesses page, input ety001 to vote.

2.gif

Thank you!