5minutes php script get - 504 Gateway Time-out nginx

rui dias 41 Reputation points
2022-02-25T16:14:22.67+00:00

on my azure webapp linux PHP

i have script that get data from files then put on my data base, and work well whit small files

but when the script run more than 5min i get (504 Gateway Time-out nginx)

seams someting from azure 300sec limit , not php max_execution_time

what could be done?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vidya Narasimhan 2,126 Reputation points Microsoft Employee
    2022-02-25T18:52:37.553+00:00

    @rui dias please go through this link
    https://learn.microsoft.com/en-us/azure/app-service/faq-availability-performance-application-issues#why-does-my-request-time-out-after-230-seconds-
    As documented, web app internally uses Azure Load Balancer that has a default idle timeout setting of four minutes. This is generally a reasonable response time limit for a web request. If your web app requires longer processing then it is advisable to make it asynchronous by using a Queue for example. And then execute the request using Azure functions. This is well described in this pattern https://learn.microsoft.com/en-us/azure/architecture/patterns/async-request-reply

    The other way to overcome this limit is to use Azure Durable Function instead of Web App.

    0 comments No comments

  2. rui dias 41 Reputation points
    2022-03-03T11:03:08.247+00:00

    about Azure functions and Azure Durable Function don,t seams viable for such simple tasks, i ill try contab whit a script for each client...

    ther are so many issues whit this service, i almost give up,

    speed issues (a simple querry 100 regs, takes 30ses, on my local server takes 1sec) seams to be the time that takes to connect to postgres data base...

    i try to use pgboucer, but its not avariable on my server parameter to enable...


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.