Hi there,
We're busy moving from apache+mod_wsgi to nginx+uwsgi, thanks for making
what looks like an awesome tool!
We like to apply some resource limits to our users via pam_limit
(/etc/security/limits.conf).
For example, we can set nproc to limit number of processes for a
particular user.
However, this does not seem to work with uwsgi processes for that user
-- despite using the uid and gid settings.
Can you think of any reason why?
Simple repro: Add the line
testuser - nproc 10
to /etc/security/limits.conf
then, su to the user, and in python try:
import subprocess
for _ in range(20):
subprocess.Popen(['python', '-c', 'import time; time.sleep(10)'])
And you should see a "resource temporarily unavailable" error.
But, if you add the same python code to a wsgi app, serve it via uwsgi
with the --uid=testuser, and you won't see any error.
So, any idea why?
cheers!
Harry
--
Harry Percival
Developer
[email protected]
+44 (0) 20 3051 2751
PythonAnywhere - full python dev & hosting, in your browser
<http://www.pythonanywhere.com/>
17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number 5467329.
Registered address: 843 Finchley Road, London NW11 8NA, UK
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi