-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setrlimit(): Operation not permitted [core/uwsgi.c line 2157] #203
Comments
every application wanting to use pam, must explicitely support it. You have to load the "pam" plugin and use --pam or --pam-user (based on your need). The pam plugin is not builtin by default but its only dependancies are the pam development headers. |
in addition to this, remember you can set the max-fd in the emperor, and this limit will be inherited by vassal (without bothering with pam) |
I tried emperor, and it didn't work. it's my ubuntu upstart init script Emperor uWSGI scriptdescription "uWSGI Emperor"; exec uwsgi and it's what I have in my emperor log and it what I have in application log |
you are right, setrlimit is called too late, while it should be called before privileges drop, will be fixed in the next few minutes |
hmm should be managed in another way, as it could be a security problem allowing the user to increase its max-fd before privileges drop. Will leave this open, i will post the solution as soon as possible |
you can try with latest code from github and adding --max-fd to the emperor. The vassals wil inherit the limit. From now on this is the blessed way |
thank you! just wanted to aprove that it works now! |
ubuntu 12.04 lts 64 bit
I have /etc/security/limits.conf set as 135K
www-data hard nofile 133333
www-data soft nofile 133333
root hard nofile 133333
root soft nofile 133333
ulimit -n
133333
but when I start uwsgi, it shows me:
detected max file descriptor number: 1024
I tried to set fd-max, and got this:
setrlimit(): Operation not permitted [core/uwsgi.c line 2157]
detected max file descriptor number: 1024
I start uwsgi as root with help of emperor and later set uid to www-data
is there some workaround to fix it ASAP?
The text was updated successfully, but these errors were encountered: