Archive for the tag 'rebuild'

SBDavid

Rebuild Apache with Higher FD_SETSIZE

Rebuild Apache with Higher FD_SETSIZE

The default FD_SETSIZE for apache is 1024. This is a hardcoded value which sets the maximum amount of files that apache can open at any given time, including log files, CGI scripts, PHP includes, database connections, etc. It is hardcoded to prevent apache from using an insane amount of file descriptors and starving your system of resources. However, if you have a lot of domains on your server with their own transfer and error logs (500+ on standard RedHat, 250-300 on Plesk servers) then you may hit the 1024 limit and get all sorts of weirdness.

At worst apache will fail to start or will not serve any web pages if it does start.

What needs to be done is to install the apache source RPM, modify the sources and spec file, and rebuild the source RPM and binary RPMs with the modified FD_SETSIZE (4096 in this case).

For DirectAdmin

Edit /usr/include/bits/typesizes.h and /usr/include/linux/posix_types.h and set

#define __FD_SETSIZE 32768

And then recompile with customapache or custombuild.

Repair and rebuild all mail configuration in plesk.

This can be done with Plesk mchk utility:

Login to the server as user root and run the mchk utility.

Example:

# /usr/local/psa/admin/sbin/mchk –with-spam

Also check for the options

# /usr/local/psa/admin/sbin/mchk –help

mchk [OPTION]

–without-spam - restore all settings except for SpamAssassin configuration
–with-spam - restore all settings
–spam-only - restore only SpamAssassin settings

This utility rebuilds in line with Plesk database Qmail control files in the /var/qmail/control, /var/qmail/users directories and mail users’ settings. Also, it sets proper ownership/permissions for all mailboxes (/var/qmail/mailnames/*).