1
votes

I am fetching data from cleardb mysql. It takes around 10 mins to give me result back.

But after 230 secs Azure gives error as "500 - The request timed out.

The web server failed to respond within the specified time."

i have tried to set max_execution_timeout to infinite and changed more config variables in .user.ini.

As well tried to set manually in first line of php script file as set_time_limit(0); and ini_set('max_execution_time', 6000000);.

But no luck.

I don't want to use webjobs.

Is there any way to resolve Azure 500 - The request timed out. issue.

1

1 Answers

0
votes

Won't work. You'll hit the in-flight request timeout long before the 10-min wait.

Here's a better approach. Call a stored procedure that produces the result and make a second call 10 minutes later to retrieve the data.

  • call the stored procedure from your code
  • return a Location: header in the response
  • follow the URL to grab results, 200 OK means you have them, 417 Expectation Failed means not yet.