504 Gateway Timeout. The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
Questions tagged [http-status-code-504]
279 questions
1
vote
1 answer
504 after 120 seconds
I have this code
$url="site.com";//~
$opts=array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept: */*i\r\n".
"User-Agent: Your application name\r\n",
"ignore_errors" => true,
"timeout" => 1800
…

Vigen Cholakyans
- 11
- 4
1
vote
1 answer
504 error with post API
I am running a website on a cloud service called "codeanywhere".
My website is receiving data from a separate server via post API. It worked fine few hours ago and suddenly it returns a 504 error.
I pinged the API's host url and it does not…

Sihoon Kim
- 1,481
- 2
- 13
- 32
1
vote
3 answers
How to run a php script in a shell on my website?
I have a PHP script located at /var/www/site/update.php full. The script is started automatically from cron:
/usr/bin/php /var/www/site/update.php full
But when I start the same script from my website:

romanown
- 325
- 2
- 9
1
vote
0 answers
open street map 504
Recently I am having problems with the tile servers of OSM, has anyone noticed an increase in the response times or the failures (504) of the petitions to:
- http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
-…

Nicolás Pascual
- 174
- 2
- 6
1
vote
0 answers
Increase timeout for handler to avoid 504 Gateway Time-out
I have a handler that return a json,
I some cases I execute more manipulations with data that increase execution time (10 min for example)
I want to increase timeout (to avoid 504 Gateway Timeout ) for this handler, I tried to add in web.config…

Alex
- 8,908
- 28
- 103
- 157
1
vote
2 answers
Why does GET Request always give 200 on PostMan but gives 504 in Java App?
I'm currently working on integrating with a company's API, and I am able to hit their Order Retrieval endpoint in PostMan, getting a 200OK status, but in my java app, I've tried hitting the endpoint with OkHttp3, Unirest, and even my own HttpReq…

P_equals_NP_2021
- 627
- 1
- 9
- 27
1
vote
2 answers
Jmeter Proxy giving 504 gateway timeout error
I have URL which is like this:
https://110.111.72.72:8001?id=username1
when I use the same URL in browser it works fine and return a result but when I use the same in Jmeter I get a 504 Gateway Timeout error.
In my organisation we do have the proxy…

Sandeep Sharma
- 109
- 2
- 15
1
vote
0 answers
Why does my sequence of curl requests through PHP return me a 504 gateway error?
I extract from a database table a set of almost 1500 data, and for each of this data I should call an endpoint through CURL in this way:
for($i=0; $i <1500; $i++) {
$headers = [
'Host: www.hostname.it',
'Accept: application/json,…

frabis
- 101
- 2
- 14
1
vote
3 answers
How to improve query performance (using explain command results f.e.)
I'm currently running this query. However, when run outside phpMyAdmin it causes a 504 timeout error. I'm thinking it has to do with how efficient the number of rows is returned or accessed by the query.
I'm not extremely experienced with MySQL and…

Evochrome
- 1,205
- 1
- 7
- 20
1
vote
1 answer
Node js request that takes long time to get a response avoid error 504
I have a node js server A that makes a request on another server B who then has to make a very complex operation that takes quite some time to finish (it triggers an algorithm that computes in about 3 minutes).
I would like the server B to respond…

Stéphane Bnn
- 75
- 2
- 11
1
vote
1 answer
Retries in Node.js got return HTTP 504
I am running http server which always returns 504:
const express = require('express')
const app = express()
app.get('/', (req, res) => {
console.log('I AM HERE');
res.status(504).send('Not found!!');
})
app.listen(3000, () =>…

Rostislav Shtanko
- 704
- 2
- 9
- 30
1
vote
1 answer
Openshift online v3 - Timeout when reading response headers from daemon process
I created an python api on openshift online with python image. If you request all the data, it takes more than 30 seconds to respond. The server gives a 504 gateway timeout http response. How do you configure the length a response can take? > I…

jeew
- 21
- 4
1
vote
1 answer
Handle "504 Gateway Time-out error" via php curl
I am scraping data for many items via php curl, But for few items, the target website send "504 Gateway Time-out nginx" error, I have no problem with that, But the main problem is it halted the whole script, So script stops after this error and…

johnDoe
- 63
- 2
- 8
1
vote
1 answer
NGINX + HTTPS causes 504 Gateway Timeout error for external requests
I'm running nginx server on my Raspberry Pi and it seems to be working just fine using HTTP protocol.
Recently, I decided to add HTTPS support to my server and got certificate from Let's Encrypt.
And it still works like a charm, if you are sending…

Alexander
- 143
- 2
- 9
1
vote
3 answers
Nginx php-fpm 504 gateway error
After hours of searching and debugging I give up!
There are thousands of questions and articles about long running PHP processes but non of them solved my issue.
I have a PHP script with the following codes:
$cur = 0;
// Second, loop for…

madz
- 1,803
- 18
- 45