Andrey (azangru) wrote,

Note to future self:

To increase the maximum limit of open files on Ubuntu:

1) When logging in via GUI:
Modify the following (commented out) line in /etc/systemd/user.conf and /etc/systemd/system.conf:

(and add the desired upper limit)

2) When logging in via command line:
Add the following lines to /etc/security/limits.conf:
/user/ hard nofile /desired max number of open files/
/user/ soft nofile /desired max number of open files/

e.g.: andrey hard nofile 65535

3) Probably add to .bashrc and .bash_profile the line to change the upper limit for the number of open files:
ulimit -n /desired max number of open files/


Writing this out here, because the readily googlable solution (summarized in step 2 above) did not work on my laptop, and it wasn’t immediately apparent that it’s only suitable for command-line logins.

Dunno if step 3 is still necessary when using step 1.

P.S.: WTF? LJ just went ahead and added a tag to my post. Because I put a hash before DefaultLimitNOFILE. Ugh!
Tags: #defaultlimitnofile

  • (no subject)

    Tweeted and retweeted by developers. Dunno. Been working for me. Can't speak to excellence, but certainly lots of stimulating humiliation:

  • (C)opied from Twitter

    Don't know if this is real or not, but if it is, it's really strange that Canadian bureaucrats should be specifically instructed not to use the…

  • (no subject)

    This was a good talk. Interesting to see that SvelteKit is taking the same direction as, by using html forms to submit data without the…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.