On January 20th, we experienced a partial outage between 12:31 PM and 2:55 PM EST shortly after upgrading all sites to Beta 6.
The root cause of the problem turned out to be changes made in Beta 6 which resulted in a higher CPU load on our servers. When we reached our peak hours (12:00 - 2:00 EST) the CPU on one of the web servers reached 100% and requests routed to that server started timing out.
We ultimately restored service by rolling all sites back to Beta 5.
What went wrong?
1) Poor regression testing
We should have caught the performance regression before we pushed the beta out to everyone. Our existing tests didn’t catch the regression because we were measuring total page load time and not measuring the actual processing time on the server. Beta 6 included changes that improved total page load time*, which masked the regressions in processing time.
Fix: We have created regression tests to monitor this
* Combining CSS into a single request and turning on content compression both improved page load time while not appreciably affecting processing time
2) We should have rolled back sooner
We found out about the problem almost immediately thanks to an alert watching for timeouts, but wasted valuable time trying to fix the problem and do an emergency deploy. We rolled back late only as a last resort. If we had rolled back immediately the outage would have been much shorter.
Fix: We will ensure that we are always backwards compatible to the last stable release, and do a rollback at the first sign of problems
3) We rolled out to 100% of sites too quickly
When we rolled out Beta 6, we went directly from a few testing sites to 100% of existing sites. If we had instead rolled out to a smaller percentage of sites, we might have noticed the increased CPU load without crippling the servers.
Fix: Future rollouts will be done progressively over a day or a few days (depending on the magnitude of the changes), rolling out to increasing percentages of sites until we reach 100%
4) Insufficient extra capacity in our web servers
Since we launched the beta, we have grown much faster than expected. We were getting close to needing a new server and this outage convinced us to add it now rather than in a few weeks or a month so that we have additional head room. Having that additional capacity might have kept the sites functioning until we rolled back.
Fix: We are adding an additional web server
Other Issues
While attempting to fix the load problems, we reset the load balancer instance. This is something normally done only during off-peak maintenance hours. This time, resetting the instance resulted in the load balancer rejecting all redirects which made it impossible to log in (among other things). Resetting the load balancer again fixed the problem. We do not know what caused this.
Fix: We have set up a monitor to alert us immediately if this happens again
Conclusion
The StackExchange team would like to apologize for any problems that this caused, and thank you for your continued patience and support during the beta.
If you have any questions, please post them at meta.stackexchange.com.