Why Your Code Is Broken On Production
May 06, 2014
This is intended as a brief checklist I can go through when something is broken in the production environment that seems to be working fine in development, but maybe you'll find something of use here too.
- The client's connection speed is slower(images and other assets fail to load, requests take forever to finish).
- The client's connection speed is quicker(race conditions).
- The client has less processing power.
- There are more clients using the same service simultaneously.
- The client is using a different browser(lag on animations handled with javascript or layout changes, standards implementation differences, unsupported operations).
- The dev environment was only tested with users from one platform (e.g. if you have multiple versions of the app on different platforms using the same servers, in dev you might only test the platform your version of the app is targeting, but then users can carry over state from the other platform and that causes a crash)
- Some servers are sending an outdated version of the code.
- Assets are cached for too long.
- Production servers have extra middleware installed that changes the API on request and response objects(e.g. I wrote "request.body.string" to get the contents of a POST request on dev, but then prod used Unicorn::TeeInput for request objects so it had to be changed to "request.body.read").
- A hotfix was performed directly on the production database without creating a seed.
- A hotfix was deployed directly to the live servers without properly being put under version control.
Alexander Biggs
Programmer, drummer and occasional blogger.