Mobile app launch sale overwhelmed Postgres, forcing an engineer to fix connection limits

During the first morning of a marketing sale, a company's newly launched mobile app drove a surge of orders that exhausted the database's connection limit. Web, admin and app services all began failing with database connection errors, and the support engineer on duty initially responded by raising connection limits. That change backfired, pushing database CPU to nearly 100% as too many concurrent queries competed for limited processing power. The engineer cut the application's connection limit to 20 and routed all traffic through PgBouncer in transaction mode, restoring service about 75 minutes after the first failure. Database CPU now stays below 45% at peak, with average API response times under 150 ms.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in