UWSGI - Harakiri Different Timeout for Django Administrator

Is it possible to set the uWSGI harakiri timeout for different Django admin pages?

I have a website that requires downloading large files, which can take more than 20 or 30 seconds, but I want the global hara-kiri timeout to be more like 15 because of the way I send the data back to the user.

Is it supported by uWSGI? Is there any way to reflect this from my Django project?

+6
source share
1 answer

Make sure that internal routing is turned on in your instance (a rather terrible warning is printed in the startup logs if you don’t have one) and delegate control of the hara-kiri to it (so remove the hara-kiri parameters):

[uwsgi] ; set harakiri to 30 seconds for /admin route = ^/admin harakiri:30 ; stop the routing chain for /admin route = ^/admin last: ; set harakiri to 15 for all the other uris route-run = harakiri:15 
+7
source

Source: https://habr.com/ru/post/980478/


All Articles