Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many files opened by a node #34

Closed
aletomsic opened this issue Jun 9, 2014 · 1 comment
Closed

Too many files opened by a node #34

aletomsic opened this issue Jun 9, 2014 · 1 comment

Comments

@aletomsic
Copy link
Contributor

I've found an issue in the clock-SI + partitioned log branch (as I have merged them into clock-SI to support the "one log per preflist" feature).
In this branch, there are currently 4 files opened "per vnode" (as there is a logging_vnode that opens N; a log per partition, and a clock-SI vnode that opens one).

THE PROBLEM

When starting a single node cluster, all of these files are opened by a single unix process. I was getting the error:

[error] Supervisor riak_core_vnode_sup had child undefined started with {riak_core_vnode,start_link,undefined} at <0.1453.0> exit with reason bad return value: {stop,{file_error,"./data/1301649895747835411525156804137939564381064921088_log3",emfile}} in context child_terminated

Unix allows, by default, a maximum of 256 file descriptors opened per process, and this limit was exceeded when running a single node cluster. you can check that in your machine with "ulimit -n".

Solution

change (only for the current session) the maximum number of file descriptors allowed per process with:

ulimit -n new_limit

LEARNED:

  • All erlang processes run in a single unix process (at least I didn't know that).
@cmeiklejohn
Copy link
Contributor

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants