Environment
Novell iPrint for Linux
Situation
Apache is either crashing, slow, or going defunct on an iPrint server.
If one or more of the following conditions exist, the problem described in this document might be present.
1. Over a dozen httpd2 instances are running on the server:
Type this command at a terminal session (putty or otherwise) while logged in as root:
ps -ef | grep httpd
If over a dozen instances of the httpd2 process shows as running, the problem might be present.
2. One or more httpd2 instances shows as [Defunct]
Type this command at a terminal session (putty or otherwise) while logged in as root:
ps -ef | grep httpd
If one or more httpd2 instances shows as [Defunct], the problem might be present.
3. Apache high utilization
Type the 'top' command at a terminal session (putty or otherwise) while logged in as root:
If httpd consistently shows as approaching or exceeding 100% CPU utilization, the problem might be present.
If one or more of the following conditions exist, the problem described in this document might be present.
1. Over a dozen httpd2 instances are running on the server:
Type this command at a terminal session (putty or otherwise) while logged in as root:
ps -ef | grep httpd
If over a dozen instances of the httpd2 process shows as running, the problem might be present.
2. One or more httpd2 instances shows as [Defunct]
Type this command at a terminal session (putty or otherwise) while logged in as root:
ps -ef | grep httpd
If one or more httpd2 instances shows as [Defunct], the problem might be present.
3. Apache high utilization
Type the 'top' command at a terminal session (putty or otherwise) while logged in as root:
If httpd consistently shows as approaching or exceeding 100% CPU utilization, the problem might be present.
Resolution
In some cases, changing the Apache MPM from prefork to worker, or worker to prefork has proven to workaround or resolve Apache crashes, defunct apache, or slow Apache performance on iPrint servers.
Pre-Step 1. Determine which MPM Apache is loading with, prefork or worker.
1. Add worker
1. Add prefork
Pre-Step 1. Determine which MPM Apache is loading with, prefork or worker.
Note: prefork is the default/standard with an iPrint server.
At a command prompt, putty or otherwise, type:Pre-Step 2. Determine if apache2-prefork and apache2-worker binaries are installed.
- ps -ef | grep httpd
- Among the data returned, one of the two will be returned:
- /usr/sbin/httpd2-prefork
- /usr/sbin/httpd2-worker
At a command prompt, putty or otherwise, type:Steps to change from prefork to workerrpm -qa | grep apache2If the MPM type is not installed, download and install the correct version for your version of SuSEEnsure the type of Apache you plan to install is among the returned results:apache2-worker-<version>
apache2-prefork-<version>To determine which version of SuSE you have installed, at a command prompt, putty or otherwise, type:cat /etc/SuSE-releaseIf the type needed is not installed, go to the "SUSE Linux Enterprise Server" section of: https://download.novell.com/patch/psdb/ to download and install it.
1. Add worker
Change the following line in /etc/sysconfig/apache2 from:
2. Remove php5 from /etc/sysconfig/apache2APACHE_MPM=""toAPACHE_MPM="worker"
Within /etc/sysconfig/apache2, remove php5 from the line which starts with APACHE_MODULES=3. Add -worker to /etc/opt/novell/iprint/httpd/conf/iprint_g.conf
There are two lines within the iprint_g.conf which need to be changed:4. Restart apacheChange this line:LoadModule expires_module /usr/lib64/apache2/mod_expires.soChange this line:to:LoadModule expires_module /usr/lib64/apache2-worker/mod_expires.soLoadModule headers_module /usr/lib64/apache2/mod_headers.soto:LoadModule headers_module /usr/lib64/apache2-worker/mod_headers.soNote: If the server is 32 bit, 'lib64' will read 'lib'
rcapache2 restartSteps to change from worker to prefork
1. Add prefork
Change the following line in /etc/sysconfig/apache2 from:
2. Remove php5 from /etc/sysconfig/apache2APACHE_MPM=""
toAPACHE_MPM="prefork"
Within /etc/sysconfig/apache2, remove php5 from the line which starts with APACHE_MODULES=3. Remove -worker from /etc/opt/novell/iprint/httpd/conf/iprint_g.conf
There are two lines within the iprint_g.conf which need to be changed:4. Restart apache
Change this line:
LoadModule expires_module /usr/lib64/apache2-worker/mod_expires.soChange this line:
to:LoadModule expires_module /usr/lib64/apache2/mod_expires.so
LoadModule headers_module /usr/lib64/apache2-worker/mod_headers.so
to:LoadModule headers_module /usr/lib64/apache2/mod_headers.so
Note: If the server is 32 bit, 'lib64' will read 'lib'
rcapache2 restart