Harish Singh
Harish Singh

Reputation: 3329

Gateway Time-out:The gateway did not receive a timely response from the upstream server

I am sending 300 newsletter at a time with a url, after 2 min it refresh itself again to send next 300 at so on.

But I am getting this error:

Gateway Time-out

The gateway did not receive a timely response from the upstream server or application.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I have set max execution to 3600

ini_set('max_execution_time', 3600);

But I am regularly getting same error. Please help me to find out the solution.

Upvotes: 18

Views: 73205

Answers (5)

Lalit sadh
Lalit sadh

Reputation: 11

I encountered the same problem. After i changed my php.ini file

  1. default_socket_timeout = 240
  2. max_execution_time = 240 to fix it.

Upvotes: 1

Jumper
Jumper

Reputation: 1

I have 18,600,000 rows in my table. TimeOut error was over when I set the TimeOut to 6000 in http.conf after the ServerRoot.

Upvotes: 0

Julio Martinez
Julio Martinez

Reputation: 31

if the problem is coming from sql sentence, is a server's processing the long query try to optimize the SQL Sentence

Upvotes: 0

Mario Radomanana
Mario Radomanana

Reputation: 1698

I encountered the same problem and I used ini_set('default_socket_timeout', 6000); to fix it. http://php.net/manual/en/filesystem.configuration.php#ini.default-socket-timeout

Upvotes: 1

damoncloudflare
damoncloudflare

Reputation: 2087

"Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

This would indicate something is not configured properly on the server.

Can't follow why you think this is a CloudFlare issue right now (from the tag). Are you getting a CloudFlare error message at all?

Upvotes: 0

Related Questions