Programming

Many web production systems  because of compatibility issues base on Apache2 backend and Nginx frontend servers. This solution gives a good known and configurable environment for all out of the box web products. The simplest method is installing an apache2-mpm-prefork with mod-php5 module. Unfortunately this solution has very poor performance. How to increase the performance of that system? Use CGI version of PHP and fcgi module instead of mod-php5. What you have to do on Debian?

Install apache apache2-mpm-worker and libapache2-mod-fcgid:

# apt-get install apache2-mpm-worker libapache2-mod-fcgid Continue Reading

Sometimes we need limit the access to some system resources or files. We want to be sure that the only one process to have an access to them in the same time. This short article explains how to use exclusive locks in shell scripts.

Assume we have a shell script (‘writer.sh‘) which writes an output file (‘output.txt‘). It writes the file line by line with one second delay between each line.

Continue Reading