Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 5 servers with apache and one dns round robin to distribute de users, but some times servers crash because the big trafic, and I need configure a fail whale page before the crash. How I can do that? Do you kow if exists any apache or tux config to do that?

share|improve this question

migrated from stackoverflow.com Jul 31 '11 at 16:05

This question came from our site for professional and enthusiast programmers.

1 Answer 1

No, you can't configure Apache to serve a failure page after it crashes, because, well, it just crashed. If it could serve a failure page, then it could serve content.

What you have to do is have a system separate from that of the failed one take over and serve the failure page -- but then, if you've got a redundant infrastructure like this, then you can just serve the actual service instead.

There are a couple of times that failure pages are useful:

  • If you have any sort of system that passes traffic to a backend (say, an FCGI server running behind Apache) then if that FCGI server craps out you serve the failure page using an error page directive (it's error_page in nginx; I can't remember the Apache equivalent right now).
  • If you have a load balancer, and incoming requests exceed the backend servers' capacity to serve traffic (or all your backends fail simultaneously... whoops!), you "shed load" onto a purely static server running on the load balancer that just serves your failure page. Since this is all static content, you'll fill your pipe before you exceed the load balancer's ability to serve pages.

So, the short answer to your question is "buy more hardware and get someone who knows what they're doing to set it up for you".

share|improve this answer

Your Answer

 
discard

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.