Error 502 When make big database request


I have one function make many database request (~7k request)

When i launch this all my site is going to 502 error.

Do you have solution for skirt this problem.

Thank you

Hi Julien,

Without making this large request is the site operating as expected? Does it need to occur in the web process, that could be tying the process up so subsequent requests are unable to be processed - a better architecture might be to consider moving the work to a background worker so it doesn’t interfere with the web process,


John B