Apache crashing, slow, or defunct on an iPrint server

  • 7013441
  • 11-Oct-2013
  • 31-Oct-2013

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.

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.
Note: prefork is the default/standard with an iPrint server.
At a command prompt, putty or otherwise, type:
  • ps -ef | grep httpd
    • Among the data returned, one of the two will be returned:
      • /usr/sbin/httpd2-prefork
      • /usr/sbin/httpd2-worker
Pre-Step 2. Determine if apache2-prefork and apache2-worker binaries are installed.
At a command prompt, putty or otherwise, type:
rpm -qa | grep apache2
Ensure the type of Apache you plan to install is among the returned results:
apache2-worker-<version>
apache2-prefork-<version>

If the MPM type is not installed, download and install the correct version for your version of SuSE
To determine which version of SuSE you have installed, at a command prompt, putty or otherwise, type:
cat /etc/SuSE-release
If 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.
Steps to change from prefork to worker
1. Add worker
Change the following line in /etc/sysconfig/apache2 from:
APACHE_MPM=""
to
APACHE_MPM="worker"
2. Remove php5 from /etc/sysconfig/apache2
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:
Change this line:
LoadModule expires_module /usr/lib64/apache2/mod_expires.so
to:
LoadModule expires_module /usr/lib64/apache2-worker/mod_expires.so
Change this line:
LoadModule headers_module /usr/lib64/apache2/mod_headers.so
to:
LoadModule headers_module /usr/lib64/apache2-worker/mod_headers.so
Note: If the server is 32 bit, 'lib64' will read 'lib'
4. Restart apache
rcapache2 restart
Steps to change from worker to prefork
1. Add prefork
Change the following line in /etc/sysconfig/apache2 from:
APACHE_MPM=""
to
APACHE_MPM="prefork"
2. Remove php5 from /etc/sysconfig/apache2
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:
Change this line:
LoadModule expires_module /usr/lib64/apache2-worker/mod_expires.so
to:
LoadModule expires_module /usr/lib64/apache2/mod_expires.so
Change this line:
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'
4. Restart apache
rcapache2 restart

Feedback service temporarily unavailable. For content questions or problems, please contact Support.