Help us understand the problem. What is going on with this article?

ulimit で nofile に大きい値を設定したい

More than 1 year has passed since last update.

ulimit で詰まった。のでメモ。

環境

  • Arch Linux x64

詰まったところ

shell
user $ ulimit -n
1024
user $ ulimit -Hn
4096
user $ ulimit -Sn 12000
user $ ulimit -n
4096
user $ ulimit -Hn 12000
ulimit: Permission denied when changing resource of type 'Maximum number of open file descriptors'
user $ 

nofile に 4096 までしか設定できない。

対応

shell
user $ sudo su
[sudo] password for user:
root # ulimit -n
1024
root # ulimit -Hn
4096
root # ulimit -Hn 12000
root # ulimit -Sn 12000
root # ulimit -n
12000
root # su - user
user $ ulimit -n
12000

一応できたが、良い方法ではないかもしれない。

kilo
大学生。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした