Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have the need to lockout users from our service when its under load to avoid degraded user experience. We have implemented a very rough and ready version of this by detecting errors or timeouts on ajax requests and displaying a popup saying we are experiencing issues and redirect the user to the lockout page. But I get far too many false negatives on this, and just refreshing the page cause the popup to show because the ajax requests are aborted etc.

How do websites normally go about this sort of stuff? Is it handled server side, client side or by apache etc?


share|improve this question
Are you trying to lockout ALL users, or only a portion of them? Do you are WHICH users get locked out, or is it just any random % of users until the errors stop? – Grant Jul 19 '12 at 17:36
Ideally we only lock out new users and the users that got through can continue on the server, it would be nice to detect the point just before a server is overloaded so current users aren't effected – Tristan Jul 20 '12 at 14:09

In a heavy duty production environment there will usually be some sort of load balancer in front of the apache server. There are both software and hardware varieties. They can be configured to do a recurring health check on the apache server, and when the server doesn't answer, all new requests can be sent to a separate webserver that only gives the error page.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.