The weird thing is, that you can refresh the page from a browser, and it
will load in less than a second.
Because it's non-deterministic, it's really hard to solve.
Ideally I'd set a timer so that any request that takes 4+ seconds to solve
is killed and retried,
and a secondary timer so that any request that has been retried 7 times
redirects to an error page,
on the error page implement some javascript to re-request the page.
I understand it's a bit much, but the first thing is important to me.
Most 99% of my requests are under 2 seconds,
but for some reason at random intervals it hits 30+ and sends an 503
error,
But it's non-deterministic because that same page can still be loaded
exactly the same within 2 seconds.
--
Ticket URL: <https://code.djangoproject.com/ticket/34159>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => wontfix
Comment:
> Ideally I'd set a timer so that any request that takes 4+ seconds to
solve is killed and retried,
and a secondary timer so that any request that has been retried 7 times
redirects to an error page,
on the error page implement some javascript to re-request the page.
I think this would work well as a third-party app. Certainly prototyping
it there would be appropriate, following up on the DevelopersMailingList
to discuss inclusion at that point.
For the simpler case, perhaps a [https://adamj.eu/tech/2019/05/27/the-
simplest-wsgi-middleware/ WSGI Middleware] would be the easiest thing to
add?
--
Ticket URL: <https://code.djangoproject.com/ticket/34159#comment:1>