435 points · by recroad · 2y ago · 266 comments
Then after you go through a few of these, you'll realize it really isn't too bad and you've dealt with bad situations before and you'll gain the confidence to know you can deal with it, even when there's no one you can reach out to for help.
- The software they purchased doesn't do anything because it was never staffed or configured correctly.
- Employees as a whole lose thousands of hours a year to terrible UX or meaningless requirements.
- Some capability doesn't actually do anything, but no one cares enough to notice.
- Useless meetings which waste collective employee hours daily.
- Capability serves no purpose, but just exists to meet audit requirements.
- Executives enrich themselves and waste company money constantly.
- Etc.
Downtime doesn't seem any worse than these problems, but it gets far more attention and panic. It feels a bit like terrorism vs. heart disease. It's important not to sweat it, because a company does not care about your sleep or mental health. It will push you as far as it can. I'm not calling companies malevolent, but they're a bit like a bully in that regard: they push you as much as you yield.
For a website - particularly ecommerce websites - you have many choices. Rarely is a product only sold on a particular website. Being down when someone is trying to place an order can and does result in losing the sale, and potentially the customer forever. Customer loyalty is often fickle - why would they wait around for you to fix your stuff when they can simply place their order on Amazon or another retail website?
Without information, it is easy to assume incompetence, or worse, just not caring.
Not sure if it's quiet-quitting or what, but the last few years (basically since covid) my consumer experiences in the US are feeling a lot more.. shall we say, European? And I guess that's fine, pretty much everything really can wait. But it's hard to maintain one's own sense of professional urgency to keep things smooth for others when literally nothing is smooth for you.
Downtime for these is critically impacting people, and you're damn right you should explain what went wrong and how you'll avoid this in the future. Because the only reasonable alternative is nationalizing them. "I dun fucked up, but meh" is not an acceptable attitude.
THIS.
Worked for a huge corporation when I first started contracting as a developer. This was a daily occurrence. Someone would push some stuff to prod and it would break their very large e-commerce site. Sometimes it was minor stuff, other times it would cripple the entire site. Most of the time, nobody GAF at all.
I remember sitting at my desk one day and my senior dev walking by my desk like Lumbergh in Office Space. Coffee in hand and just casually said to me, "Looks like someone broke the build, most of the video game pages are throwing 404's right now, going to lunch, see you soon." and then just walked away.
I also found out one day one of the CDN folks that was running the Akamai account quit and then a month later, we found out one of our secondary content servers had been down since the day he left. When dude left, he never transferred any of his knowledge to the other team members so once they found out the server was down, it took another two days to get in contact with someone at Akamai who was handling our account.
At my previous job if something went down on our site, it was a four alarm fire, war room, and all hands on deck to get it resolved or heads would roll. It was so dysfunctional to work somewhere when something broke or stopped working, nobody was in any hurry to fix it. Several times I just thought, "Is this what they mean when they say "the inmates are running the asylum""?
That's funny, because reading your first sentence I was thinking that was the dysfunctional place. I had a boss that would take problems from 0 to 10 in a flash, when the problem was really a 4 or 5, and it really was not a great environment.
Hmm… interesting thought. It’s interesting how labeling something a terror attack makes the public lose critical thinking and act incoherently for a bit. It’s like a stunning shock response. The very same this author describes.
Do you think some managers intentionally play up the severity of problems to push their teams into this panic mode?
People in customer service know clients definitely do.
It is interesting how these concepts connect.
I'm sure some do. Much more often I observe that the managers themselves are just reacting to the incentive system in their environment -- and that those incentive systems are complex, not-widely-understood, and often built "accidentally." ie, companies are often accidentally incentivizing the wrong behaviors and are often powerless to prevent this.
Fantastic analogy! One is scary but practically non-existent, and the other will bring early death to many people you know.
if no one noticed then can you really say it was broken?
One time a few years ago, a coworker called me to tell me the stress we were under was causing her hair to fall out. I mentioned I'd lost significant weight and wasn't sleeping well, especially since another coworker had quit and now I was shouldering his responsibilities (programming and managing a junior). She said she was going to quit. I wished her the best. Around six months later, I had to quit too. It took around a year for me to get back to normal sleep patterns and for my heart to stop racing in the night.
Oh yeah, another guy from that team had a "cardiac event" due to stress and had to take a month off.
One of my programming mantras is "no black magic." If I don't understand why something works, then it's not done.
I take this same approach to an incident. If someone can't coherently identify why their suggestion will have an impact, I don't think they should do it. Now there may come a time that you need to just pull the trigger on something, but as I think back I'm not sure that was ever the case in the end.
It was wild to see the top brass—normally very cool and composed—start suggesting arbitrary potential fixes during an incident.
I'm willing to throw shit at the wall early in the triaging process, but only when they are low-impact and "simple" things. stuff like -
have we tried clearing cache?
have we checked DNS resolver for errors?
have we restarted the server?
etc. I try to find the "dumb" problems before jumping to some wild fix. In one of the worst outages of my career, a team I was working for tried to do a full database restore, which had never been done in production, based on a guess. At 3am on a saturday. I push back really hard at stuff like that.
This. * 1000
I am very grateful that my earliest training was as an RF bench technician. It taught me how to find and fix really weird problems, without freaking out.
However, it does appear that this particular event may have been caused by reliance on a dependency that may not have merited that reliance.
I'm really, really careful about dependencies. That's an attitude that wins me few friends, in this crowd, but it's been a long time, since I've had 2AM freakouts.
so many ppl nowadays don't care about knowing how thing works, they just push shit and cross the fingers.
Imagine how much more the damage would have been if someone was telling this solo developer to stop trying to make 'fetch' happen.
You're absolutely right that fear interferes with one's ability to reason rationally but I'd also add that fear is highly infectious. If ICs sees their leaders/managers/colleagues panicking, they will often panic too. Thankfully my VP was always level-headed and prioritized clarity over action.
Apparently you worked for a Navy Seal, so yeah, likely a very cool dude :)
If the company wants to derisk their business, they can hire more people and create systematic safeguards in their services over a long period of time. The return on this investment is theirs. If they don't make this investment, they don't get the returns - simple as that.
If you are afraid of "losing your job" - remember that you might lose your job even if you were the hero because of reasons not really in your control.
The only time to really panic is when your family is under crisis. To prevent your family from going in crisis, you should build safeguards in terms of health, income etc.
Business owners can do the same if they want safeguards. If not, fine, things will just break. And it is NOT an individual engineers problem to fix all of their poor decisions.
It seems to relate to fight or flight, as opposed to freezing. All three are not great and can significantly escalate a bad situation.
Maybe more specific though, situations where mistakes cause more dire mistakes are sometimes called "incident pits". Not unknown to engineers, but I think we ripped it off the scuba-divers, mountaineers, and other folks that are interested in studying safety-critical situations. https://www.outdoorswimmingsociety.com/the-incident-pit/
> We must do something. This is something. Therefore, we must do this.
Yes, literally cooling down. Combined with conscious breathing. And then go on doing, what you can do.
We all slept so much better after that
My first serious job as an adult was avionics repair. I knew how to do SOME component-level troubleshooting but I wasn't very good at it and always got lost in schematics pretty quickly. When I ran across a broken device that had a problem I couldn't solve within 30 minutes of investigation, my first instinct was to say, "welp, this is beyond my abilities" and ship the card or box off as permanently broken, or try to pawn it off to a more senior tech in the shop.
Fortunately, I had a mentor who disabused me of that tendency. He taught me that EVERY fault has a cause. Every time you think you've exhausted all options, what it really means is that you've only exhausted all CONVENIENT options and you just have to suck it up and get cracking on the harder paths.
Afterward I made a promise to myself to never get into such a panic again. But funny enough, when I feel like panic is immanent I just remind myself that whatever problem I have is absolute peanuts compared to that event. So for me at least having one truly bad event helps me put things into context.
(1) the logs had JSON-escaped JSON and I am slightly proud of those regexes because it is the only time I hopefully ever have to use 8 backslashes in a row https://xkcd.com/1638/
For me it's only happened once. It was an anxiety attack, and I'm very lucky my wife was there to talk me through it and help me understand what was happening. She's had them many times, but it was my first (and thankfully only).
It turns out that this sort of thing happens to people, and that there's nothing wrong with it. It doesn't mean you're defective or weak. That's a really important point to internalize.
Xanax is worth having on hand, since that was what finally ended it for me and I was able to drift off to sleep.
I guess my point is, there's a difference between having intrusive thoughts vs something that debilitates you and that you legitimately can't control, such as an anxiety attack or a panic attack. You won't be getting any work done if those happen, and that's ok.
Not all breakdowns come in the form of panic and anxiety attacks. Those are certainly a way that breakdowns can manifest, but it’s not the only way. Stress manifests in wildly different ways for different people and even stressors.
You weren’t in his head, experiencing what he was experiencing, so it’s pretty much impossible to “diagnose” from the outside. It certainly sounds like he was functionally paralyzed for hours, even if he didn’t have a full blown panic attack.
If he was functionally paralyzed for hours, then that absolutely qualifies. I was reading through it and thinking "If you can debug stuff, you're probably not having a mental breakdown" and wanted to highlight that some people do break down (which is why it's called a breakdown) and that it's ok.
Doing a search online seems to indicate that Xanax can be addictive?
https://www.drugs.com/xanax.html
Doesn't seem to be the kind of thing to take lightly?
One of the potential side-effects of the medication is after you stop taking it your baseline anxiety will be worse for a while as your body resets. Similar to caffeine and feeling tired.
Depending on how long you're trying to use it you may need to slowly increase the dose to offset increased baseline. This isn't really dangerous using for say.. one week every two months.
It is possible to get psychologically dependent by frequently using it instead of strategies you would learn in therapy. This also happens with things like alcohol.
Using medication to deal with occasional severe anxiety or panic attacks is far safer than substituting it with alcohol.
Those are relatively rare, so you shouldn't end up taking it at a frequency where addiction can manifest. But everyone's different; keep open communications with your doctor.
I would be surprised if you asked your GP "I have mental breakdowns now and then, I'd like some Xanax", and they just handed it out to you. Then again, I don't live in the US, so maybe the doctors there do just dish it out.
I do feel more stressed 12-24 hours after taking benzos though. This leads some people to take a higher dose and you can see where that leads.
But no, no addiction in me or anyone I know using it “as needed”.
Some doctors prescribe it daily for a long period of time, which is reckless if other drugs are available for the same problem, like sertraline for anxiety. But then, some doctors prescribe oxy for pain when ibuprofen will do. Malicious stuff. All the addiction warnings are to steer people away from these drugs in these scenarios.
Benzos 3x a day for a month will be tough to shake. Benzos 3x a month to 3x a year — hard to imagine problems with that.
As with any medical thing, better consult it with a specialist anyway.
> A safe taper typically takes much longer than a week-long detox or 28-day stay in rehab — an average of six to 12 months, experts say.
This is not to downplay SSRI tapers, which can be plenty awful if you are on them for a long time, but quitting benzos too abruptly can give you seizures. You have to be very careful to taper them safely.
We will likely see a large cohort of people who got into tech in the mid 2000s dying off from stress related disease.
I've been an anxiety basket case my whole life and the idea that an addictive pill could take it all away terrifies me - I'd be hooked for life.
I had the same fears and I'm not gonna say you should try medication, but I will share it my psychiatrist did. She wouldn't let me have more fifteen low-dose pills at any one time.
Consider your relationship with alcohol. If you already have a problem with it or completely abstain from it, I would strongly recommend avoiding medication.
I have to keep myself very disciplined on the "helpful" medications I do allow into my life because I know how easy it'd be for me to get hooked and start depending on the meds to avoid my problems. Instead I've been working on training myself to see through my nerves.
Alcohol at least has the drawback that the few times I've had it, I've had such an awful experience that I don't associate it with avoiding my problems.
I mean, that's how a lot of prescriptions work anyway. I take daily medication to prevent anxiety and depression. It's not addictive, but I try pretty hard to never miss a day, because anxiety and depression will get in the way of me living my life. Assuming Xanax is safe to take daily (I have no idea), the only difference is that a supply disruption would have side-effects. But if I run out of my medication, I'll get depressed within weeks, almost guaranteed, withdrawals or no.
Highlights two lessons. 1. If you ship it, you own it. Therefore the less you ship, the better. Keep dependencies to a minimum. 2. Keep non-critical things out of the critical path. A failing AC compressor should not prevent your engine from running. Very difficult to achieve in the browser, but worth attempting.
Unless someone with decision-making power is going to be woken up at 4AM for a problem, they have very little incentive (intrinsic or extrinsic) to block a project on such nebulous claims as "Reducing dependencies" or "Less things on the critical path", if a business leader has come to them with a request.
https://github.com/PostHog/posthog-js/blob/759829c67fcb8720f...
The biggest lesson here is, if you're writing a popular library that monkey-patches global functions, it needs to be really well tested.
There's a difference between "I'll throw posthog calls in a try/catch just in case" and "With posthog I literally can't make fetch() calls with POST"
The whole fetch and XHR functions are mocked and become no-ops, so obviously this won't catch any issues when interacting with the underlying (native or otherwise) libraries. They have Cypress set up so I don't see why you'd want to mock the browser APIs.
The number of issues that can be prevented with an acceptance level test that has a user log in and do one simple interaction is amazing. Where I can convince the powers that be, PRs to main are gated by a build that runs, among others, that simple kind of AC test. If it was merged to main, you _know_ it will not totally break production.
We had regular outages with our internal emailing system at a small e-commerce shop. I stepped in and added one test that actually sent an email to a known sink that we could verify and had that test run pre-deploy. We went to zero email outages. Tests had the occasional flake that auto-retried. Also, if your acceptance tests are flaky, how do you know your software isn't? Bad excuse to avoid acceptance level testing
PostHog patching a very important global function is a feature that should be well-documented so that the people who are using it are aware of it and can be reasonably expected to have it in mind when debugging these seemingly unexplainable issues.
eg heap analytics still (as of this month) bad touches something inside hotwire and randomly entirely breaks hotwire causing every click to do a full page load. ime, it affects 30-60% of page loads. You can fix it (but thanks for 50+ hours of debugging) but making heap load after all hotwire js.
I take this as a reminder of the importance of giving precise names to variables. The code
res = await originalFetch(url, init)
looks harmless enough. But in fact the `url` parameter is not necessarily a URL, as the TypeScript declaration makes clear: url: URL | RequestInfo
The problem arises in the case where it is not a URL, but a RequestInfo object, which has been “used up” by the construction of the Request object earlier in the function implementation and cannot be used again here.It would have been more difficult to overlook the problem with this change if the parameter were named something more precise such as `urlOrRequestInfo`.
(A much more speculative idea is the thought that it is possible to formalise the idea of a value being “used up” using linear types, derived from linear logic, so conceivably a suitable type system could prevent this class of bug.)
[0] https://github.com/PostHog/posthog-js/pull/1351/commits/2497...
The cold sweats and shame I felt, man... Plus it's on the App Store so there's the review process to deal with which extends the timeline for a fix. Thankfully, they picked it up for review 30 minutes after submission and approved it in a few minutes.
I’ll, maybe controversially, sometimes allow my (early-career) team members to break prod, if I can see it happening ahead of time, but am confident that we’ll be able to recover quickly. It’s common knowledge that being given room to fail is important. But many leaders draw the line at failures that actually hit customers. If one finds oneself in the very common and very fortunate position to be building software that isn’t in charge of landing planes or anything similarly important, they should definitely let their team experience prod failures, even if it’s at the expense of so-and-so from Spokane Washington not being able to use their product for a few minutes.
That was honestly one of the best things that could’ve happened to me and I still use the story for new hires to this day. It’s a very humbling reminder that nobody is perfect and we all make mistakes. And I’m still here, so it’s never the end of the world.
As an SRE/devops/platform engineer or whatever the title of the day is people want to give. I would have zeroed in on the difference between the working system. And the non-working system. Either adding and then removing, or removing and then adding back the differences one at a time. Until something worked. What I see is two things. 1) you have an environment where it does work. 2) the failing environment was working, then started failing.
Is my method superior to yours, no. It just is being stated to highlight the difference in the way we look at a problem. Both of a zero in on what we know. I know systems, you know code.
plug a good board on an extender. run a diagnostic that fails in a loop. using a scope, look at every pin on the connector. write down what you see. replace with a bad board. repeat.
which signals are different? chase them back. if the schematic does not match, get out a voltmeter and your eyes and draw a schematic that reflects how the board is wired.
he called this "good card - bad card".
and it worked. not going to make any claims about cost effectiveness, but we fixed every board. and my troubleshooting skills in digital electronics were greatly improved.
this was a 'fireman' kind of job. waiting for the system to break, so it didn't matter if 2 techs put a week into 1 circuit board.
Reverting your own code, but still using a broken PostHog update from that same day? For me, the lesson is to make sure that I can revert everything, including dependencies.
https://github.com/PostHog/posthog/issues/24471#issuecomment...
Though you can opt to bundle it yourself:
https://github.com/PostHog/posthog/issues/24471#issuecomment...
Now there's a supply chain attack vector...
Edit: the extension's manifest gave it nearly every permission, on every web site, including internal ones
Whoa! Good idea!
Could have been worse. At least the change didn't expose a hidden exploit.
You handled it well OP, the silver lining of incidents like this is the grab bag of valuable takeaways!
But most of us have been in some situation similar, if not quite as bad. (Running your own company is going to be uniquely stressful.)
And it’s (IMO) why anonymity online is usually a bad idea - we need to learn, deep in our bones, that what is said online is the same as standing up in front of the church congregation and reading out our tweets - if you would not in front the vicar, don’t in front of the planet.
Every tyrannical government in history would love this maxim.
With more than one person you can bounce ideas off each other and share the pain so to speak. It's highly desirable.
This outage was definitely disruptive and we shouldn't have let this happen. We will be doing a full post mortem write up, but this affected a small percentage of our users, so the comparison with Crowdstrike isn't fair.
- Used your recommended way of implementing PostHog [1]
- Used a feature of the product
- Used a feature of the product
The comparison to CrowdStrike is not fair, you're right. But this attempt to shed responsibility still leaves a sour taste.
[1] See "This is the simplest way to get PostHog up and running. It only takes a few minutes." from your website, which is the first method suggested when clicking the "installation" tab
Definitely not trying to shed responsibility here, we messed up and we'll make sure this doesn't happen again.
I personally would have like to see a bit more contrition rather than trying to minimise the issue.
Par for the course honestly. The amount of garbage that gets called "production" these days is mindboggling. No blue/green or canary deployments, shipping code that has nothing pinned, no clear rollback, etc. This is what happens when anyone can become an EngineerTM after a two week JavaScript boot camp.
The ecosystem has plenty of versioning and best practices, but they do jack squat when you recommend to your customers to bypass them and trust that you'll never break your latest build.
On the other hand the author of the article did the exact same thing. They either pushed a release without testing, or they automatically just pull in the latest version of an external library, without any testing or verification. Now I lean towards this being the latter, as if they pushed a release and then the site broke, they would have considered a rollback. Kinda hard to blame others for failing to do testing that you also didn't do.
Edit: So others have pointed out that PostHog will just pull down the latest version on it's own, unless you actively disable that feature. That seems like a brave move.
Best memory was walking in there and seeing all the conveyer belts above me shooting packages across.
While I have never experienced anything similar myself, it really helped me to put things in perspective. Since then, I've worked on some critical systems that were actually life or death, but I no longer do. For the /vast/ majority of technology systems, nobody will die if you let the outage last just a few hours longer. The worst case scenario is a financial cost to the company who employs you, which might be your own company. Smart companies de-risk this by getting various forms of business insurance, and that should include you if it's your own company.
So, do everything you can to fix the outage, but approach it with some perspective. It's not life or death, nobody is shooting at you.
In my experience, not vendoring has _always_ led to breakages that are hard to debug and fix.
Meanwhile, vendoring is quite easy nowadays. Every reasonable package manager, and even npm, can do this near-trivially.
Also funny that the culprit was posthog since I have some past experience with it.
That's why trying to solve problems in the middle of the night just ends up in stress.
https://www.faa.gov/documentLibrary/media/Advisory_Circular/...
But indeed, regardless of time of day, if I just wake up, or am woken up, I'm basically a big, dangerous toddler when it comes to problem solving.
Context and nuance is important, of course. We're all so different.
It includes:
* Blaming the tools (and the author)
* Not focusing on facts in the timeline
* Not considering improvements
But that doesn't make for engaging content, right?
> * At $TIME we observed HTTP POST calls failing
> * At $TIME customers reported inability to make changes to ticket prices and promo codes
> * $PERSON took the following steps to debug...
> * Root cause: an update to a vendor library resulted in cascading failures to the site
> * 5 whys (which might include lack of defensive programming, the use of a CDN without a fixed version, etc. etc.)
> * Next steps: pin the CDN version or pull the dependency into the build, etc.
Actually, that still looks like a pretty good story to me without any of the associated mania.
Are we going to talk about how someone wanted analytics everywhere even though it's expensive and they don't use it, that they chose the vendor and didn't provide time to evaluate it, that they wanted it added now-now-now to production even though it hadn't gone through dev, even though it was unplanned work in a busy sprint with other risky work, and that they wanted it on the critical path despite specific objections from some in engineering?
Not saying any of this was the case here, but this kind of thing happens frequently. While engineering is saying "let's use blameless post-mortems to highlight problems in the system" a lot of other people are thinking "now we get to see who could or couldn't fix a problem we caused, focus on that, and downplay our own role in causing trouble". Devs talking about CDNs and HTTP-POST and engineering processes are super helpful for steering the conversation away from broken business processes.
Easily 80% of PMs I've been involved in probably come down to "we had rules for moving tested code through dev/qa/prod, but we were forced to ignore the process we had agreed to because $PERSON / $DEPARTMENT said so". No one can actually talk about the elephant in the room though, because it's career suicide after you're branded as not a team-player. For all the kids out there.. it's really important to learn to be able to recognize the difference between a PM that's going to be an earnest effort to understand things, vs a PM that is going to be an unhelpful but necessary ritual of humiliation.
It seems pretty silly to look at a blog post that is very obviously not meant to be a technical post-mortem and criticize how it isn't a good one.
I spent hours on a call with the clients sr. engineer and we eventually came up with a script to fix it. It was after midnight, my director said, good job, you are tired, I'll run the script, call it a night.
An hour later director ran the wrong script... and then called me.
Clients sr. engineer was legitimately flabbergasted, only time I have ever seen that word apply in real life.
Was a not good, very bad day.
> fetch() broken on August 19: TypeError: ...
Not broken at this version, broken on August 19. This is why I'm terrified of putting anything on the web. It is a dark scary place where runtime dependency on servers that you don't control is considered normal.
One day I'll start my own p2p thing with just a bunch of TUI's and I'll only manage to convince six people to use it each for less than a month and then I'll have to go get a real job again but at least I won't have been at the mercy of PostHog.
Yeah, that is terrifying. In a nearby comment [1], a PostHog co-founder wrote this affected sites which "did not have a specific version of the JS library pinned and deployed a new version, or were using the snippet". I gather from that is it possible to pin the version, and this incident highlights the value of doing so.
Unison does this I believe.
"We're investigating an issue affecting $X".
As a user, I can rule out that the issue is at my end. I can focus on other things and I won't add to the stack of emails.
This is one of my biggest frustrations with AWS being slow to update their status page during interruptions. I can spend much of the intervening time frantically debugging my software, only to discover the issue is at their end.
And then he rolled out a fix that was broken, too - showing incompetence in development, understanding the problem, and a total failure to do proper QA on the fix.
Royally fucked the pooch twice and he's all "gee golly whillikers!"
I'm struggling to find the lesson to take out of that. Limit your dependencies? Have a safe mode that deactivates everything optional?
Primary I use a code generator to write most of it.
For huge services it may not be practical, but for most it usually provides a heads up if something stops working. with an integration.
To this day, I simply refuse to do on call. There's no enough money you can pay me that would make me to suffer that again.
PS: Fuck you, Rackspace.
In fact, I have dealt with an extremely similar situation where a bunch of calls for one of our APIs were failing silently but only after they had taken card payment transactions. Dealing with the developers of this system was like pulling teeth, after we got them to stop stammering and stop chipping in with their ideas (after half a day with this issue ongoing) it took 10 minutes to find the culprit by simply going through the system task by task until we got to the failing task (confirmation emails were unable to send so the API server failed for the entire order despite payments being taken etc.).
This only required 2 things: knowledge of the system, and systematic process to fault finding. You would think that developers who have at least the first, being the ones who wrote it, but sometimes even that is a big ask.
Maybe I'm just burnt out from this industry and incompetent people but... come on... no excuses really.
And then I’d add: Start with reading the error message. In his panic state, he seems to have thought it was a red herring. Error messages are gold. It gives you a concrete thing to work backwards from.
In fact, it would have made debugging this particular issue harder, because the difference in Posthog configuration between dev and prod is what clued the author in on Posthog causing the problem.
To avoid this kind of problem, the solution is to avoid “live” dependencies which can change in production without your testing. Instead, pin all dependencies to fixed versions and host them yourself.
>> Instead, pin all dependencies to fixed versions and host them yourself.
Indeed.
Use better tools? Know better your tools? Know better how to debug? Add yet another tool to detect the error?
In all big companies where I worked, at the end of such an event, it boiled down to answer the 3 questions: - what happened?
- why did it happen?
- what do we do so it does not ever happen again?
You can start a web service business solo (or with a small handful of folks). But the web doesn't shut down overnight, so either have a plan to get 24-hour support onboarded early or accept that you're going to lose a lot of sleep.
(And if you think that's fun, wait until you trip over a regulatory hurdle and you get to come out of that 2AM code-bash to a meeting with some federal or state agent at 9AM...)
Come on, if POST requests work locally and not on PROD, isn't this an obvious place to start?