While monitoring a http/php server, I needed to do some statistics about php-cgi memory usage. Playing with memory_limit in PHP, we wanted to know the average memory usage per php-cgi process. This is easily calculated with our best friend awk. First, get the number of php running processes: # ps aux | grep php-cgi | …
permanently load enable HTTP Accept Filter FreeBSD kernel module (accf_http)
While reading articles about optimization, I read about the accf_http module. The man page of the module is here, where you can read: The utility of accf_http is such that a server will not have to context switch several times before performing the initial parsing of the request. To load this module, use the following …
Munin and Use of uninitializer value in eval
On some of freshly installed servers (Debian Etch), I encountered these error messages in /var/log/munin/munin-node.log: Use of uninitialized value in eval {block} exit at /usr/sbin/munin-node line 456, <CHILD> line 8. What a great error message 🙂 After digging into Google results, I found it was just a problem with host_name variable in the configuration. Default …
Nginx and worker_connections are more than open file resource limit warning
If you encounter this warning message under Linux: 2009/03/09 21:23:19 [warn] 26827#0: 4096 worker_connections are more than open file resource limit: 1024 A solution is to use the command ulimit in nginx start script, just before lunching nginx: […] ulimit -n 65536 […]
Debian Lenny and perl locales warning messages
If like me you just have upgraded your Debian system to Lenny, you probably encounter the following warnings while launching perl: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: Â Â Â Â Â Â Â LANGUAGE = (unset), Â Â Â Â Â Â Â LC_ALL = (unset), Â Â Â Â Â Â Â LANG = “fr_FR.UTF-8” Â Â Â are supported and installed on your system. perl: …
Check if cron is working with monit
I encountered a problem last week with cron. crond was running but the jobs seems to not work. After debugging the crontab, I saw that on one job, the username was missing. Nothing was written in the logs to say that there was a problem. To avoid future problems, I wrote an alert for monit. …
Amazon is moving into CDN market
As read in Diamond Notes, Amazon is moving into CDN market with CloudFront. Some Content Delivery Network providers Akamaï Akamaï on Crunchbase BitGravity BitGravity on Crunchbase EdgeCast Networks EdgeCast Networks on Crunchbase Limelight Network Limelight Network on Crunchbase Panther Express Panther Express on Crunchbase
Install gem without documentation
If you need to install your gems without extra documentation, use flags –no-rdoc and –no-ri Example: $ gem install –no-rdoc –no-ri rails Edit: You can automate this with the following in your .gemrc : gem: –no-ri –no-rdoc It is said that using these flags on every gem command can break things, so the alternate configuration …
Fix nginx increase server_names_hash_bucket_size error
When adding new virtual hosts in your nginx configuration file, you can experience this error message: # nginx -t 2008/11/13 09:37:03 [emerg] 12299#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32 2008/11/13 09:37:03 [emerg] 12299#0: the configuration file /etc/nginx/nginx.conf test failed server_names_hash_bucket_size controls the maximum length of a virtual host entry (ie the …
Install Sun Java Runtime Environment (JRE) on Debian Etch
Sun JRE is available in the non-free repository. You need to update your repositories configuration file (/etc/apt/sources.list). Add the following line: deb http://ftp.us.debian.org/debian/ etch main contrib non-free Update apt with apt-get update command and you’re ready to install the JRE. $ apt-get install sun-java5-jre Check your java binary: $ java -version java version “1.5.0_14” Java(TM) …