FlightAware Discussions

504 (Gateway Time-out) FlightAware ADS-B Statistics selecting United Kingdom

I can’t believe it’s just me, but I’m seeing a lot of HTTP Status 504 (Gateway Time-out) when selecting a country such as United Kingdom on the FlightAware ADS-B Statistics.

Suspect the query is probably not using a primary key or an alternate index on the database.

Now we have 21K participants and growing, perhaps the country query needs optimising?

Selecting “All” works reasonably well, but I’m interested in UK only and that’s taking > 30 secs so I get a 504 instead of a ranking answer that I am looking for.

Is there any other more efficient query that I can do to find my rank in country? Thanks.

How do you select a country?
When opening the list “Top Countries”, none of them can be selected for details.

1 Like

I’m suggesting there is a problem with Top Sites (30 Days) selecting “United Kingdom” as the NEAREST LOCATION…

…and not Top Countries.

A further observation is I see the timeout issue only selecting a country that happens to be high up the Top Countries list.
Hence if I select somewhere like (say) Slovenia, I get the query coming back quickly. But If I select other countries such as UK, Germany, Netherlands etc (these all have plenty of sites and aircraft seen), then I get 504 Gateway Timeout.

I wonder if the query is enumerating the whole country before providing the top 10,25,50,100 or 200 rows as requested. I smacks of a database query not using indexes in a sensible way.

I can reproduce the problem selecting United States too

1 Like

Ah, this function. Sorry, was a misunderstanding.

I have tried it and selected UK
I dd not get the error, but an empty list:

The fact you got an empty list signifies the problem :wink:

If you are using a browser such as Chrome on Windows, switch on the DevTools (F12) and repeat the query. It will show that HTTP Status 504 is being returned rather than 200 OK.


I get the same timeout when selecting United Kingdom. Last week it was working but taking over a minute to display anything.


Seems it is tripping over its own cookies


This issue appears to have been fixed :smiley:
The country specific queries are much quicker today (for me anyway!) and do not time-out.
Thanks to whoever solved the problem.

Confirmed for me too.

Thank you for reporting this issue! The ADS-B statistics pages underwent some big performance improvements last year, but it turned out the country selection wasn’t making use of the new optimizations.

1 Like