I have a Rails application on cloud run with an endpoint called by our apps to determine if their version is current and if not, requires a download. This is a simple, one record read of the database in a table of less than one hundred records and the vast majority of the time the endpoint returns in a few milliseconds. According to the logs most of the time the records is read form SQL cache and the SQL query and system insights never show any load or locks on the DB.
For some reason this endpoint and a few others occasionally return an HTTP 304 response after 20 to 25 seconds (!). I never see any attempt to access the database ( or anything else ) by the code in these cases. Simply a one line entry in the log of a GET with an absurdly large response time.
I’m expecting a normal sub-second response