City stats timeing out

The citystats section is timing out on any city with a non-trivial amount of data.

For example, when I go to see Seattle:

If I click on the stats icon, the spinner appears, and then 30 second later, it finally times out.
I see that the request for chart.json times out after 30 seconds.
I can go to some of my cities that I only have a few activities on and see stats, but cities with large number of activities seem to break.

:link: My profile link :

Yeah, there are some beastly queries in there that can be working with years of data. :sweat_smile: Thanks for pointing out that timeouts are happening - I’ll try and take a look at that soon.

A post was split to a new topic: Add total time metric to city stats tab

Oof, I forgot about this!

I spent a bit of time on it, and I’ve got it functional but there’s still room for improvement.