Try 30 days of free premium.

503 Service Temporarily Unavailable

moesizlak wrote 8 years ago: 1

New problem just started recently. My app is getting an HTTP 503 error. Wireshark shows this query:

GET /shows/1871 HTTP/1.1

Accept: */*; q=0.5, application/xml

Accept-Encoding: gzip

User-Agent: unirest-ruby/1.1

Host: api.tvmaze.com

Returns this result:

HTTP/1.1 503 Service Temporarily Unavailable

Server: nginx/1.4.6 (Ubuntu)

Date: Thu, 29 Sep 2016 19:09:18 GMT

Content-Type: text/html; charset=utf-8

Content-Length: 221

Connection: keep-alive

<html>

<head><title>503 Service Temporarily Unavailable</title></head>

<body bgcolor="white">

<center><h1>503 Service Temporarily Unavailable</h1></center>

<hr><center>nginx/1.4.6 (Ubuntu)</center>

</body>

</html>

But this query, from the same host, works correctly:

GET /shows/1871 HTTP/1.1

Host: api.tvmaze.com

Accept: */*

User-Agent: unirest-ruby/1.1


gazza911 wrote 8 years ago: 1

Does this consistently happen when you try to request that, or was it a temporary thing?

Gadfly wrote 8 years ago: 1

I got it for about 15 minutes, at 11-11:15 a.m. Eastern U.S. time. No problems or recurrence since.

moesizlak wrote 8 years ago: 1

gazza911 wrote:
Does this consistently happen when you try to request that, or was it a temporary thing?

Consistently. It began a few hours ago today and is still occurring.

My app first calls /search/shows?q= and this call succeeds. It then calls /shows/ and this is the call that is returns error 503. But like I said, I can get the call to /shows/ to work by using different HTTP headers in the request so it's an odd problem.


gazza911 wrote 8 years ago: 1

moesizlak wrote:
Consistently. It began a few hours ago today and is still occurring.
My app first calls /search/shows?q= and this call succeeds. It then calls /shows/ and this is the call that is returns error 503. But like I said, I can get the call to /shows/ to work by using different HTTP headers in the request so it's an odd problem.

I think I might know why...

Looks like I was wrong


david wrote 8 years ago: 1

We're getting unusually high DDOS attacks today, which causes stricter rate limiting (and possibly some intermittent failures).

Still, if you're currently getting these errors on the API you're most likely sending a huge amount of requests per second from the same IP address. Try slowing it down a bit and/or implementing a local cache.

moesizlak wrote 8 years ago: 1

david wrote:
We're getting unusually high DDOS attacks today, which causes stricter rate limiting (and possibly some intermittent failures).
Still, if you're currently getting these errors on the API you're most likely sending a huge amount of requests per second from the same IP address. Try slowing it down a bit and/or implementing a local cache.

David, That's not it. I'm definitely not sending that many requests, not even close to be honest. In fact I can can run this from the command line of the same server and get a valid response:

curl -H 'Acept-encoding: gzip' -H'Accept: */*; q=0.5, application/xml' -H'Host: api.tvmaze.com' -H'User-Agent
: unirest-ruby/1.1' http://api.tvmaze.com/shows/123

But when my app, on the same server, same IP address, runs a nearly identical query (only difference I can see is the order of the HTTP headers), it gets a 503.

moesizlak wrote 8 years ago: 1

It randomly fixed itself a few minutes ago...

FYI my app sends very few requests so it wasn't rate limiting related.


david wrote 8 years ago: 1

Hm. I'm pretty sure the difference between your app and curl has just been a coincidence. I do have a hunch though - try again now?


david wrote 8 years ago: 1

moesizlak wrote:
It randomly fixed itself a few minutes ago...
FYI my app sends very few requests so it wasn't rate limiting related.

Yeah, in that case it wasn't your fault; it's a case of somewhat confusing nginx implementation.

Try 30 days of free premium.