Tag Archives: CentOS

Dovecot and the “Too many open files” error

EDIT: This method is not sufficient. See below for update!

I recently switched our mailserver from Gentoo and Courier-IMAP to CentOS 5.6 and Dovecot, which all went pretty smooth, until this weekend :) Dovecot wasn’t accepting logins anymore, and a quick look at the logs revealed the following:

May 30 09:06:17 mx1 dovecot: pipe() failed: Too many open files
May 30 09:06:17 mx1 dovecot: Temporary failure in creating login processes, slowing down for now

This is due to the standard max. open files limit of 1024, and was solved rather quickly by adding the following to /etc/security/limits.conf:

*                soft    nofile          8192
*                hard    nofile          63536

This increases the system-wide maximum of open files to a soft limit of 8192 files, and a hard limit of 63536 files. Restart Dovecot and verify the new limit is in effect with the following command:

cat /proc/`pidof dovecot`/limits |grep files

It should give the following output:

Max open files 8192 63536 files

UPDATE:

It seems this method does not work as well as i thought it would. I found a better and much quicker/easier way to fix this. Just edit /etc/sysconfig/dovecot and change it to:

# Here you can specify your dovecot command line options.
#
#OPTIONS=”"

# Increase max open files for dovecot process
ulimit -n 4096

Restart dovecot and you’re all set. Don’t forget to revert the changes to /etc/security/limits.conf if you altered this file.

New PHP4 RPMs for CentOS

Since there still seems to be people interested in PHP4 for CentOS, I thought i’d share my recently compiled RPM’s for PHP-4.4.7. They were build on a CentOS 5.0 system, for i386 and x86_64 architecture.

This time the source RPM is included as well.

You can find them here

CentOS 64 bit (x86_64) and VMWare Server

Recently i had to install VMWare Server on a CentOS 4.4 x86_64 box for one of our clients. I ran a clean install of CentOS 4.4 from the server CD. The RPM install of VMWare Server went fine but during the vmware-config.pl step i ran into some trouble related to missing libraries.

After some searching on Google i found an excellent post on the weblog of a CentOS developer named Karanbir Singh. To make everything work, you need to poison your 64-bit system with some 32-bit libraries :)

I had to install the following packages to make things work (some are sucked in by dependancies):

  • xorg-x11-libs.i386
  • expat.i386 (dep. of xorg-x11-libs)
  • fontconfig.i386 (dep. of xorg-x11-libs)
  • freetype.i386 (dep. of xorg-x11-libs)
  • xorg-x11-Mesa-libGL.i386 (dep. of xorg-x11-libs)
  • zlib.i386 (dep. of xorg-x11-libs)
  • glibc.i686
  • gcc.x86_64

After this vmware-config.pl ran flawlessly and VMWare Server is up and running!

New PHP-4.4.4 RPM’s for CentOS

I’ve built a bunch of new CentOS RPM’s from the recently released php-4.4.4. Just like last time, they’re available for both 32- and 64-bit Intel architectures, and although i’ve tested and use them myself, they come with absolutely no guarantee :)

You can get them here

PHP-4.4.2 RPMs for CentOS 4.3

Been a while since my last post ;) But anyway:

At the moment, we mostly run Slackware and Gentoo based servers at my workplace. Since the number of servers is steadily growing (currently 30-something servers), so is the maintenance. This is why i’ve been doing some research on more maintenance-friendly distros, one of which is CentOS, the community release of Red Hat Enterprise Linux.

So far i am really impressed by CentOS, and i’m getting more into the whole RPM buzz. I have always been a ‘compile-it-yourself’ person, and never really been a fan of RPM, but i’m starting to see the benefits now :)

The only thing i was a bit bummed about, was the relatively old version of php that came with CentOS 4.3. Since we run the latest version of PHP4 on most of our servers, i’ve been looking into rolling my own RPMs. After a bit of research on rpmbuild and related tools, the result is a bunch of PHP-4.4.2 RPMs for both 64-bit (x86_64) and 32-bit (i386) servers. And since CentOS is the community version of RHEL4, i thought i’d share these with the world.

You can find them here. Ofcourse the usual disclaimers apply ;)