rotating-proxy icon indicating copy to clipboard operation
rotating-proxy copied to clipboard

First request always returns 502 Bad Gateway

Open robosoul opened this issue 8 years ago • 1 comments

I noticed a pattern:

  1. start container
$ docker run -d -p 5566:5566 -p 4444:4444 --env tors=25 mattes/rotating-proxy
a82c7efd44798f5d0686e372663a3302a2df429b810e8302a2c69435efb57e07
  1. send request
$ curl --proxy localhost:5566 http://www.example.com -I
HTTP/1.0 502 Bad Gateway
Cache-Control: no-cache
Connection: close
Content-Type: text/html
  1. send request after the first one returned 502:
$ curl --proxy localhost:5566 http://www.example.com -I
HTTP/1.1 200 OK
Content-Length: 606
ETag: "359670651"
Date: Sun, 26 Mar 2017 08:56:23 GMT
Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT
Expires: Sun, 02 Apr 2017 08:56:23 GMT
Content-Encoding: gzip
Accept-Ranges: bytes
Content-Type: text/html
Server: ECS (iad/182A)
X-Cache: HIT
Age: 1
Connection: keep-alive

Any idea why's the first time response 502 ?

Tnx, Luka

robosoul avatar Mar 26 '17 08:03 robosoul

For me waiting for around 5 min works -- it initially returned all 504, but after 5 mins its started working. Maybe it needs a bit "warm up" time?

ilcn avatar Aug 18 '17 15:08 ilcn