This incident was caused by an un-optimized database query, created by an edge-case in API logic. A distinct kind of API request caused several of these un-optimized queries to run, eating up the database workers' CPU. This, in turn, caused a reduced capacity of the database to handle other queries, in turn raising the API error rates to 2-3%. We have remedied this problem at both the database level (by imposing stricter query time limits) and the application level (by accounting for the edge case and preventing it from generating an un-optimized query).