Snap! Websites
An Open Source CMS System in C++
When creating a dynamic website, the time it takes to create a page requires a proper (large enough) timeout or Apache will generate a 500 error even before the system has a chance to reply one byte.
Snap!, like many other content manager systems (CMS), will generate the entire page before sending anything back to the client. There are several reasons for doing this:
The result may be a very long wait by Apache to get an answer. This is especially true of very complicated pages (content wise.)
However, where you are most likely going to get a hit is Cassandra. If Cassandra falls asleep (does not get used for long enough and the system goes as far as swapping out part of Cassandra's code or the java interpreter) then the restart may take quite a long time (relatively to the normal behavior which is close to instantaneous replies.)
For that reason properly setting up the Timeout parameter in your Apache setup may end up being important. By default the Timeout is 300 which is 5 minutes and much more than enough (frankly if Cassandra doesn't wake up with 10 to 20 seconds, you probably have another problem!) I have been using 15 which is too short when Cassandra falls asleep. A good number is probably between 60 to 120. You will have to test with your own setup for the right value. To see how long it takes for Cassandra to wake up, do not access your server for 24h or so, then do one timed request. See how long it takes and multiply that by 4 or 5 and you should have your answer (although do not use less than 15.)
It is possible to setup the maximum to a very large number such as 12,000 although it is recommended that you never really go beyond 300.
IMPORTANT NOTE:
Things that really take a long time (such as scanner uploaded files for viruses) are run by the Snap! backend processes. These are not affected by the Apache Timeout parameter and are in general not timed at all.
Snap! Websites
An Open Source CMS System in C++