Help for owners
My app falls over when many users are online
Short answer
An app that fails only at busy times usually has a server or database that cannot handle that many requests at once. The cure is finding which part runs out first, not adding random power. Note when it happens, keep your hosting account in view, and ask a developer to measure before changing anything.
Does this sound like your situation?
- The app is fine in the morning and fails during the busy hour.
- Users see timeouts or errors after a campaign or notification.
- Some screens load and others hang.
- The server needs a restart to recover.
- It got worse as I got more customers.
Why does this happen?
A single server has a fixed capacity
Cloud providers describe running a group of servers so that the right number is available for the load. Amazon's service lets you set a minimum and maximum number of servers and adjust them as demand changes.
Confirmed by docs.aws.amazon.com
The database becomes the bottleneck
Many requests at once can queue behind slow database queries or locks, and then every screen waits. The technical detail is on the fix pages linked below.
The app sends too many requests
A screen that asks the server for the same data repeatedly, or all users refreshing at the same moment after a notification, multiplies the load.
There is no early warning
Without monitoring, the first sign is a customer complaint. Health checks and alerts show the problem before it grows.
Confirmed by docs.aws.amazon.com
What can I do about it today?
- Write down when it failsTimes, what customers were doing and what the error looked like. Patterns appear quickly.
- Look at your hosting dashboardIf your provider shows processor and memory charts, take a screenshot of a bad hour.
- Check for recent changesNew feature, campaign, notification or new customer? Load often follows one.
- Do not just upgrade the server blindlyA bigger server may help or may only delay the problem. Measure first.
- Avoid restarting during busy hoursA restart drops users in the middle of actions. Do it in a quiet moment if you must.
When should I bring someone in?
- Failures happen on your busiest days.
- A campaign or launch is coming.
- The server keeps crashing and nobody knows why.
How do I handle it?
- Measure under loadI test the system with many simulated users on a copy, never on your live service.
- Find what runs out firstProcessor, memory, database or a single slow call. I report the one that matters most.
- Fix the cheapest part firstOften a query, a missing cache or a repeated request, before any bigger change.
- Prepare for growthWhere a single server is not enough, I plan running more than one, with a backup and a tested rollback.
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?
Do I need a bigger server?
Sometimes, but not always. Measuring first shows if the cause is capacity or something fixable in the code.
Can the app handle a sudden spike?
Only if it has been tested for it. Testing on a copy gives that answer before the day arrives.
Will you test on my live system?
No. Load tests belong on a copy so real customers are not affected.
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
504 Gateway Time-outnginx gives up waiting for the app and returns 504502 Bad Gatewaynginx 502 Bad Gateway in front of a Node.js appERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transactionA statement waited for a lock held by another transaction and gave up (error 1205)Error: EMFILE: too many open files, open '/path/to/file'Node.js crashes with EMFILE: too many open files