HS-Datadesk / koronavirus-avoindata

HS julkaisee Suomen koronavirustartunnat avoimena datana.
https://www.hs.fi/aihe/koronavirus/
MIT License
100 stars 27 forks source link

v2 API frequent 502 Bad Gateway #61

Closed jonniek closed 4 years ago

jonniek commented 4 years ago

About every fifth request fails for me. This never happened with v1 API.

Log: https://hastebin.com/efedusewel.json

Perhaps interesting part of log header x-amzn-errortype: InternalServerErrorException

quarian commented 4 years ago

Thanks for the info - I'll investigate.

quarian commented 4 years ago

Right, so I found at least one bug that could cause this. The old API uses just database to serve the results, whereas this new one pulls from three distinct ones (THL and two of our own). I have parallelised the queries for performance, but there was a deadlocking execution path. It has been fixed now - let's monitor if this fixes the errors. @jonniek

quarian commented 4 years ago

Logs show a drop of 5XX errors back to 0 - what's the feel on the consumer side?

jonniek commented 4 years ago

Works well now. Thanks for the fix!