Lesson from Caio Almeida's Brazil elections war story: a Rails API opened a DB transaction (and thus held a DB connection) for the entire duration of a synchronous external HTTP call to a Python Lambda. Under load the connection pool filled up with idle-but-open connections causing contention even though no DB activity was happening. Fix: close or release the DB connection around external calls that don't touch the database.