[PYTHON] Set ulimit in supervisor

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

However, it did not work well, and as a result of trial and error, it was found that it is better to call ulimit and change the user in the command without specifying the user with the supervisor function as shown below. It seems that if user is specified in the supervisor settings, it will return to the user default.

[program:program_name]
command=bash -c "ulimit -n 65536;exec setuidgid hoge /path/to/script.sh" 
#user=hoge #Cannot be used because ulimit changes

I get an access error to /root/.python-egg when running python

The condition is unknown because it may or may not occur depending on the environment, but it can be solved with the following settings.

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

Recommended Posts

Set ulimit in supervisor
Dynamically set env.hosts in fabric
Methods available in set type
Set up Nunjucks in Node.js
Set python test in jenkins
Set opset to embed in ONNX
To set default encoding to utf-8 in python
Associate the table set in python models.py
Set default values before commit in sqlalchemy.orm
Set up Pipenv in Pycharm in Windows environment