Menu

1 / 2

My site went down for a few hours yesterday and my users knew before me

DEV Community·Anguishe·6 months ago
#jCnT50UM
#ai#programming#beginners#status#exit
Reading 0:00
15s threshold

It happened to me.

My site — bashsnippets.xyz — had been down for six hours before I knew

about it. I found out because a reader emailed me. Not because I checked.

Not because I had monitoring. Because someone else had to tell me.

That's the kind of thing that sits with you.

The fix took 20 minutes to build. Here's exactly what I wrote and why

every piece of it matters.

The problem with checking manually

The natural instinct is to just open a browser and load the page.

But that has two failure modes:

You only check when you remember to

You don't check at 2am when it actually goes down

What you want is automated, logged, and running while you sleep.

Start with the one-liner

Before building the full script, understand the core command:

curl -o /dev/null -s -w "%{http_code}" https://yoursite.com

Enter fullscreen mode

Exit fullscreen mode

Run it. It prints one number.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.