I have a Pyramid web application running a uwsgi server with touch-reload enabled. If I touch the corresponding file to make a graceful restart and immediately hit the route in my application, it takes about 15 seconds before I get a response. After printing timestamps in different places of my application, I found the following:
- The total runtime of my main method
__init__.pyis 6 seconds - The average runtime of my uwsgi post_fork_hook is 2.5 seconds.
- The total execution time from the beginning of my main method to the end of the call I am calling is 9 seconds.
I'm wondering how to diagnose where the extra time goes, since it takes 15 seconds to get resposne from my application, but it only takes 9 seconds from the start of the main to the end of my call. General tips on how to speed up uwsgi reboot or touch-reload alternatives are also welcome. Thanks!
source
share