← Topics

Website crashes when tickets go on sale: why, and how to stop it

Why a ticket drop or limited release takes a site down in the first minute, what caching, bigger servers and rate limits fix and miss, and how a waiting room keeps checkout up.

The site is fine all month, then tickets go on sale at 10:00 and by 10:01 the checkout page shows 502 errors. The people who came the moment sales opened, your most eager buyers, are the ones who see the errors. The problem is rarely the number of visitors in a day. It is that a day's visitors arrive in the same minute, and every one of them asks your server for something it cannot cache.

Why the first minute breaks it

A product page can be cached, but a cart, a seat map, a stock check and a payment cannot. When thousands of people press Buy together, each of those steps opens a database connection or calls your payment provider at the same time. Connection pools run out, requests wait in line inside the server, time out and are retried, and the retries add to the load. Once checkout slows down, people refresh, and every refresh is a new request.

What each fix does

Rate limits and Turnstile on Cloudflare's Free plan are described in Cloudflare's WAF docs and Turnstile docs, checked on 2026-12-04.

Caching and a waiting room work together: the CDN takes the browsing, and the waiting room decides how many people reach the steps that cannot be cached.

How a waiting room keeps checkout up

  1. Measure what checkout can take. Run a load test or look at the last sale: if errors began at around 400 orders a minute, admit 300 a minute.
  2. Put the line only in front of the busy pages. The event page, cart and checkout get the check. The rest of the site stays open.
  3. Start fair. People who arrive before the start get a random place when the line opens, so the person who refreshed first does not win by speed.
  4. Run it live. Pause the line if payments slow down, let more in when they recover, and close it when you sell out.
Waiting rooms in the portal: live counts, the pace, when the line clears, and buttons to pause, let people in, mark sold out or post a notice.
Waiting rooms in the portal: live counts, the pace, when the line clears, and buttons to pause, let people in, mark sold out or post a notice.

The full story of a drop, with code for each framework, is in Waiting rooms for ticket drops and flash sales. If the rush comes from a newsletter or a TV spot instead of a timed sale, see Waiting rooms for peak hours, and for the rush after maintenance, Waiting rooms for maintenance.

Questions

Why does my site crash only during ticket sales?

Because the visitors arrive together. A thousand people spread over a day is easy; a thousand people pressing Buy in the same ten seconds opens a thousand database connections and payment calls at once. Caching can't absorb that part, because carts and stock are different for every visitor.

Will a bigger server stop the crash?

It moves the limit, but the database, the stock check and the payment provider are usually what fail first, and they don't grow with your web servers. A waiting room keeps the number of people at checkout at the level you know works, however many arrive.

Can I use a waiting room for one sale only?

Yes. Hibira Waiting Room has a free plan for 5,000 queued visitors a month, and a one-off event pass for a single 72-hour sale without a subscription. Nothing changes in your DNS or hosting.

How long does it take to set up?

Create a room, add one middleware call to the pages that sell out and test it with a few browsers. The waiting room guide has the steps for Next.js, Laravel, Django, Rails, Cloudflare Workers and more.

Product names are trademarks of their owners.