Skip to content

I get a "Too many open files" error #135

Closed Answered by Congyuwang
orena1 asked this question in Q&A
Discussion options

You must be logged in to vote

If this still does not work, try to increase user limits:

You can increase the limits temporarily using ulimit, or you can make permanent changes by editing configuration files.

  • Temporarily (current session):
    ulimit -n 4096  # Example: set limit to 4096

before running your program.

  • Permanently:
    Edit the /etc/security/limits.conf file and add or modify the following lines:

    username soft nofile 4096
    username hard nofile 8192

    Replace username with the actual username.

    You can also apply changes system-wide:

    * soft nofile 4096
    * hard nofile 8192

Replies: 6 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@orena1
Comment options

@Congyuwang
Comment options

Comment options

You must be logged in to vote
1 reply
@orena1
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Congyuwang
Comment options

@Congyuwang
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Congyuwang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #132 on June 25, 2024 03:09.