Hi, The observed 504 errors are coming from either haproxy or varnish, stopping the request because snapshot take too much time to reply (typically a query on gcc or linux take over a minute to complete).
While investigating this issue, I discovered that snapshot is doing way too much SQL queries to reply to /packages/{package}/{version} requests, especially on packages with a lot of binary files. I've optimized the code and got very promising results (down from ~2000 SQL queries to 4 and from over a minute to 2s). I've created an MR here: https://salsa.debian.org/snapshot-team/snapshot/-/merge_requests/9 I'll let you know when this is merged and deployed. -- Baptiste Beauplat
signature.asc
Description: This is a digitally signed message part