Answer the question
In order to leave comments, you need to log in
How to change the maximum time for a POST request?
I made a project with which you can parse a victim site. The problem is this: when the load is too high, I get 502. How can I fix it? I tried to google changing the POST request time, I didn’t find anything suitable, maybe someone will give a tip
Answer the question
In order to leave comments, you need to log in
You need to start by saying that launching some long processes in the djanga request-response cycle is not the most sensible idea at all.
Typically, this kind of task is sent out by a separate celery process or some similar mechanism. The execution time of tasks (in our case, parsing) is not critical in them: the background process is not a site visitor. Wait, it's not going anywhere.
PS and the connection timeout can be set. For example, in requests, a popular library for making HTTP requests, it's done like this .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question