Logging resque with monolog

PHP-Resque is a php library for creating workers that will execute background jobs using a redis queue. It is a port of the Resque Ruby library developed by Github and stores the data on redis using the exact same data format. The library is logging to STDOUT and has the "VERBOSE" and "VVERBOSE" settings to choose between basic and detailed information. There is also an event/hook system that allows for a more custom logging solution.

Cron tasks on load balanced identical web servers

A common setup for web applications is multiple identical web servers behind a load balancer. The benefit of having such a setup is horizontal scaling. When all the web servers are exactly the same, there is no single point of failure. If there is an issue with any one of the servers, the problematic server can be quickly replaced with a new healthy instance.

Configuring apache

Apache configuration should be set accordingly to the instance apache runs on. If the configuration values are too high - on a large number of requests, apache might choke by starting too many httpd processes which will increase the load average on the instance drastically and kill the server. Each one of these processes will open an sql connection, but won’t close it since it will never complete properly. You might notice a lot of open mysql connections when it happens.