On August 15th, an Audit Logging feature was added to PyPI which records events when Users and Projects are modified. This feature retains a history of events for Projects indefinitely. Due to a misconfiguration in the way that the feature was implemented, event logs for Projects were being loaded from the database whenever a Project was fetched by the PyPI codebase. This additional load steadily increased as the size of the events table grew until it reached a tipping point causing database queries to spill over to disk, dramatically impacting performance leading to a significant outage.
This was resolved by ensuring that the Audit Log events are only loaded from the database when necessary for display to users and administrators. Database load and application response times quickly dropped to levels similar to before the feature was shipped.