Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

My website goes offline again and again

Short answer

Repeated outages usually come from a few causes: the server running out of memory or disk, a process that crashes and is not restarted, an expired certificate, or a spike in visitors. Note the times it fails, ask your host for the server logs, and do not rebuild anything until the cause is known.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • The site is down every few days, then comes back by itself or after a restart.
  • It fails at the same time each day, often at night.
  • Visitors see a 502, 503 or 504 error or a security warning.
  • My developer restarts it and says it is fixed.
  • I only hear about it from customers.

Why does this happen?

  1. The program behind the site crashes

    The web server answers visitors, but the app behind it can stop. The visitor then sees a bad gateway error.

  2. The server is out of memory or a limit

    Amazon documents that instance status checks fail on problems such as exhausted memory, a corrupted file system or incorrect startup configuration, and that these typically need you to fix them, for example by rebooting.

  3. The underlying machine has a fault

    AWS says system status checks detect problems such as loss of network connectivity or power or hardware issues on the physical host, which need AWS involvement. For instances backed by EBS you can stop and start the instance, which in most cases moves it to a new host.

  4. The security certificate was not renewed

    Let's Encrypt certificates are valid for 90 days by default, and the project recommends renewing them every 60 days. If automatic renewal fails, browsers warn visitors away.

  5. A slow request holds everything up

    When one part waits too long, the front server gives up and shows a timeout error.

What can I do about it today?

  1. Write down every outageDate, time, how long, what error visitors saw and what brought it back.
  2. Set up free outside monitoringA simple uptime checker that emails you when the site stops answering means you hear first, and gives you exact times.
  3. Ask your host or developer for the logsRequest the server logs for the minutes before each outage. Do not ask them to wipe or rebuild anything.
  4. Check the certificate datesClick the padlock in the browser and read the expiry date.
  5. Do not keep restarting as the planA restart hides the cause, so the outage returns.

When should I bring someone in?

  • It has happened more than once.
  • The outages cost orders or bookings.
  • Nobody can tell you the cause from logs.

How do I handle it?

  1. Back up firstA backup is taken before any change to the live server.
  2. Find the cause in the evidenceLogs, memory and disk use, certificate renewal and the host's status checks for the failure times.
  3. Fix the cause and add a safety netRestart-on-failure, an alert to you, and renewal checks, so a repeat is short and known.
  4. Have a tested rollbackAny change I make has a way back that I have tested.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Is it my hosting company?

Sometimes. The host's status checks and logs show whether the machine or your own program failed.

Will a bigger server fix it?

Only if it ran out of memory or capacity. A crash loop or an expired certificate is not fixed by size.

Can I be told before it happens?

An uptime alert tells you within minutes of an outage. It does not prevent one.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

For your developer: the technical fixes

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.