Is it possible to set uWSGI's harakiri timeout to be different for Django admin pages?
I have a site which requires large files to be uploaded, which can take more than 20 or 30 seconds, but I want the global harakiri timeout to be more like 15s because of how I'm sending data back to the user.
Is this supported by uWSGI? Is there any way I can indidate this from within my Django project?
Be sure your instance has internal routing enabled (a pretty scary warning is printed on startup logs if you do not have it) and delegates harakiri management to it (so remove the harakiri options):
[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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With