Hi, I have a somewhat large web application that seems to take a very long time (~20) to start responding to http requests after I reload uwsgi by touching a temporary file (the "graceful restart"). I ran an strace on one of the lagging worker processes while it was in this hanging state and it made upwards of 10k fstat/stat() calls and 20k open() calls probing for files related to eggs in use by my application. If I set uwsgi to start with one worker process, it takes about 3-5 seconds for the process to start taking requests, but if I scale it up to 10, it takes ~20 seconds for all the processes to become ready and the system reaches a load of 6 -- there is some serious i/o contention going on while these processes spin up.
I recursively pre-load modules in my code after the loadapp() call in my wsgi configuration and I suspect that this is the source of the slowdown. Is there any way I can speed up the loading process? Alternatively, is there a way that I can keep the worker processes around for a period of time until the new worker processes are done loading? Is there any way to indicate that a process is 'ready' for requests to uwsgi instead of handing it requests immediately? Thanks, Greg
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
