By default, Plesk allows you to manage up to 300 domains on a single server. If you plan to run more sites on a Plesk server, consider switching on the support of piped logs in the Apache web server. This is done on the Tools & Settings > Apache Web Server page of the Server Administration Panel.
Running Apache with piped logs allows you to host up to 900 domains on a server. If you are going to host a larger number of web sites on your server, Apache may fail to work because of a problem with the file descriptors limit. To avoid this, you can recompile Apache with more file descriptors.
Note: Plesk (8.2.0 and later) with piped logs feature enabled can host up to 900 domains without the recompilation of Apache system packages.
To recompile related applications and libraries, such as openssl, apache, imap, PHP etc from source RPMs with more file descriptors, perform the following steps:
# /sbin/sysctl fs.file-max
fs.file-max = 131072
If fs.file-max
is quite small (several thousands or so), change it in the following way:
/etc/sysctl.conf
:fs.file-max = 131072
# /sbin/sysctl -w fs.file-max=131072
Note: If you are running Virtuozzo, you have to adjust the fs.file-max
on the hardware node and it will be applied to all VEs.
glibc-kernheaders
and glibc-headers
packages installed. They can be taken from the operating system CD or from the download site of your operating system.__FD_SETSIZE
value in typesizes.h
and posix_types.h
files:typesizes.h
file, run:# find /usr/include/ -name typesizes.h
posix_types.h
file, run:# find /usr/include/ -name posix_types.h
__FD_SETSIZE
value in a file, run:#define __FD_SETSIZE 65536
openssl-*.src.rpm
httpd-*.src.rpm
imap-*.src.rpm
php-*.src.rpm
libc-client-devel-*.src.rpm
(if this RPM is installed)curl-*.src.rpm
openssl
first. For example:# /usr/bin/rpmbuild --rebuild openssl-0.9.7a-35.src.rpm
openssl
RPM with the following command line:# rpm -Uvh --force /usr/src/redhat/RPMS/i386/openssl-0.9.7a-35.i386.rpm
cURL
in the same way.apache
:# rpmbuild --rebuild httpd-2.0.51-2.9.src.rpm
# rpm -Uvh --force /usr/src/redhat/RPMS/i386/httpd-2.0.51-2.9.i386.rpm
# rpm -Uvh --force /usr/src/redhat/RPMS/i386/httpd-devel-2.0.51-2.9.i386.rpm
# rpm -Uvh --force /usr/src/redhat/RPMS/i386/mod_ssl-2.0.51-2.9.i386.rpm
libc-client
library which is provided by the imap
or libc-client-devel
packages (depending on the OS) . Recompile the one that is installed in the system, for example:# /usr/bin/rpmbuild --rebuild imap-2002d-3.src.rpm
# rpm -Uvh --force /usr/src/redhat/RPMS/i386/imap-devel-2002d-3.i386.rpm
or
# /usr/bin/rpmbuild --rebuild libc-client-devel.src.rpm
# rpm -Uvh --force /usr/src/redhat/RPMS/i386/libc-client-devel.rpm
PHP
, for example:# rpmbuild --rebuild php-4.3.10-2.4.src.rpm
# rpm -Uvh --force /usr/src/redhat/RPMS/i386/php-*
/etc/rc.d/init.d/httpd
and /usr/sbin/apachectl
startup scripts of apache before other commands:ulimit -n 65536
/usr/sbin/suexec
with the one from Plesk:# cp /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec
# /etc/init.d/httpd restart
For Plesk versions earlier than 7.5:
# cp /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec
# chown root:apache /usr/sbin/suexec
# chmod 4510 /usr/sbin/suexec
# /etc/init.d/httpd restart
To recompile Apache, PHP and IMAP with a number of file descriptors larger than FD_SETSIZE (1024) on Debian systems:
/etc/sysctl.conf
:fs.file-max = 65536
/sbin/sysctl -w fs.file-max=65536
Note that the value fs.file-max
can be equal to 220=1048576).
/etc/init.d/apache2 and /usr/sbin/apache2ctl
:ulimit -n `cat /proc/sys/fs/file-max`
#define __FD_SETSIZE 65536
# apt-get install apt-src
# apt-src --build install openssl
# dpkg -i libssl*.deb openssl*.deb
# apt-src --build install apache2
# dpkg -i libapr*.deb apache2_*.deb apache2-common*.deb apache2-mpm-prefork*.deb apache2-utils*.deb
# cp /opt/psa/suexec/psa-suexec2 /usr/lib/apache2/suexec2 /etc/init.d/apache2 restart
# apt-src --build install libc-client2002edebian
# dpkg -i libc-client-dev_2002edebian1-*.deb libc-client2002edebian*.deb mlock*.deb
# apt-src --build install php4
# dpkg -i `ls *deb|grep php4|grep -v apache-mod`