LoginSignup
6
6

More than 5 years have passed since last update.

supervisorでulimitを設定する

Last updated at Posted at 2014-02-07

[Supervisor-users] Clarification on ulimit and minfds https://lists.supervisord.org/pipermail/supervisor-users/2011-December/001004.html

を参考にしたが、うまく動かず、試行錯誤した結果、以下のように、supervisorの機能でuser指定せず、command中でulimit呼び出しとユーザ変更を行うと良い事がわかった。
supervisorの設定でuser指定するとuserデフォルトに戻ってしまうらしい。

[program:program_name]
command=bash -c "ulimit -n 65536;exec setuidgid hoge /path/to/script.sh" 
#user=hoge # ulimitが変わるため使えない

python実行時に/root/.python-eggへのアクセスエラーが出る

環境によって発生したりしなかったりして条件不明ですが以下設定で解決。

environment=PYTHON_EGG_CACHE="/home/hoge/.python-eggs"
6
6
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6