Andrey (azangru) wrote,
Andrey
azangru

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:
#DefaultLimitNOFILE=

(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/

Source

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
Subscribe

  • (no subject)

    Bret talks to Peter McCormack — a British journalist focusing mostly on Bitcoin — about his conversation with Pierre Kory and his convictions about…

  • (no subject)

    New Dell Precision models ending in 60 (5560, 5760, 7560, 7760) have just been released; and yes, they come with an option of pre-installed Ubuntu. I…

  • (no subject)

    Unbelievable! At the same time, Google is all like, don't use localStorage, its api is synchronous and therefore blocking; use indexedDB instead:

  • Post a new comment

    Error

    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.
  • 0 comments