Windows hangs and High CPU¶
Known issues to check first¶
Hang (partial startup) on Windows with SSL enabled
IBM HTTP Server 7.0 and earlier automatically probes for legacy (IP-connected) cryptographic accelerators. If you encounter a hang during startup on Windows, try adding
SSLAcceleratorDisable
to each VirtualHost with SSL enabled.This directive is separate from modern crypto cards configured with
SSLPKCSDriver
.
System preparation¶
If you have not previously setup the Windows error reporting tools to save error information then refer to 'MustGather setup of error reporting dump tools for Microsoft Windows' for information on performing this setup. This setup step must be performed prior to recreating the hang. Make sure you are aware of the directory into which the tool will save the log and dump data.
Remove any existing Windows log and crash files from its output directory (after backing up as appropriate).
Also, please ensure that 'ExtendedStatus On'
is enabled in the web
server configuration file.
Install
ProcDump
from Microsoft Windows Sysinternals to request dumps from hung
processes.
Add the Procdump install location to your Path or make a note of the
install location so that you can invoke the utility from that location
later. Note that the Procdump install zip contains both a procdump.exe
and a procdump64.exe
(for 64-bit OS systems)
AFPA¶
AFPA must be disabled and IBM HTTP Server restarted in order to collect
some of the information below. You must be aware of whether or not AFPA
is enabled in the web server configuration file before gathering the
hang information. We recommend that AFPA be disabled in advance if the
hang is reproducible so that the best set of information is available
for analysis. To ensure that AFPA is disabled verify that the LoadModule
statement for mod_afpa_cache.so
in the configuration file is either
commented out or absent, i.e.:
#LoadModule ibm_afpa_module modules/mod_afpa_cache.so
This module is no longer shipped with IHS starting with Version 9.0.
Obtaining information at the time of the hang or issue¶
These steps must be performed at the time of the hang
Gather general system and web server information.
This information is gathered by running the ihsdiag
ServerDoc DescribeConfig
tool as described by the instructions in the System and web server information tool documentation.
This will result in a directory of information named 'ServerConfig.timestamp
'.
That directory should be zipped and sent to IBM using the provided instructions after completing the following steps for obtaining additional information.TCP connection information
Run '
netstat -an > netstat.txt
' at a command-prompt.
Save thenetstat.txt
file into the 'ServerConfig.timestamp
' directory.Network configuration
Run '
ipconfig /all > ipconfig.txt
' at a command-prompt.
Save theipconfig.txt
file into the 'ServerConfig.timestamp
' directory.Server status report
(
'ExtendedStatus On'
must be enabled for the running web server.)From a web browser, request
http://www.example.com/server-status/?showmodule
from a web browser.
(Replace www.example.com with your web server address). If the web server is completely hung, it may not respond. Otherwise, save the server status report as a file in the 'ServerConfig.timestamp
' directory.Task Manager information
Windows 2012 or newer
Start 'Task Manager' (You can run '
taskmgr.exe
' from a Command Prompt)Select the '
Details
' tabMake sure the needed columns are displayed
At a minimum, the following columns of information should be displayed:
PID
User name
CPU
CPU Time
Working set (memory)
Memory (private working set)
Handles
Threads
User objects
I/O read bytes
To select columns to be displayed:
Right-click one of the column headers (such as '
Name
')Click '
Select columns
' on the menu that is displayed
(A 'Select columns' window is displayed)Select the checkbox of each column to be displayed (Refer to the list above)
Click the 'OK' button to save the settings
Click the '
Name
' column header to sort the list of processes by name.
Windows versions prior to Windows 2012
Start 'Task Manager' (You can run '
taskmgr.exe
' from a Command Prompt)Select the
'Processes'
tabMake sure the needed columns are displayed
At a minimum, the following columns of information should be displayed:
PID (Process Identifier)
CPU Usage
CPU Time
Memory usage (Memory - Private Working Set)
USER Objects
I/O Read Bytes
User Name
Handle Count (Handles)
Thread Count (Threads)
To select columns to be displayed:
Select
'View / Select Columns...'
(A 'Select Columns' window similar to the following is displayed):Select the checkbox of each column to be displayed (Refer to the list above)
Click the 'OK' button to save the settings
Select the
'Show processes from all users'
checkbox on theProcesses
tab page (if not already selected)Click the '
Image Name
' column header to sort the list of processes by name.
For all Windows verisons after following the appropriate steps above:
Find the two
Apache.exe
orhttpd.exe
processes.The process with the larger number of threads (
252
threads in the example above) is the IHS child process. (Note: This should be almost the value set for ThreadsPerChild in the config). Make a note of the associated PID (2292
in the example above) for the IHS child process. It will be used later.
Note: The child PID can also usually be determined by looking for the IHS process with +/- ThreadsPerChild number of threads displayed in the output of a 'pslist
' invocation.With the Task Manager window selected, press
<Alt><PrtSc>
to save an image of the window to the clipboard.Run the Windows
Wordpad
program and paste the image of the Task Manager window into the new file. Save it astaskmgr.doc
ortaskmgr.rtf
.
Copy the saved file into the 'ServerConfig.timestamp
' directory.
Web server state - capture a dump
You must skip this step if AFPA is enabled, which is why it is important to have disabled it as described earlier in this document.
Choose one of the following techniques to capture a dump:
Use Procdump tool (preferred):
Run '
procdump64 -ma CHILDPID
' [Use 'procdump' for 32-bit OS systems.]
(where CHILDPID is the PID of the IHS child process as determined in the prior steps above.)Note the location of the dump as printed in your command prompt window. Copy the file(s) into the '
ServerConfig.timestamp
' directory.Note: Multiple invocations will create uniquely named dumps and does not overwrite previously generated dumps until the DumpCount value is reached (default is 10) at which point the older dump files will be overwritten as new dumps are created. {DumpCount an be adjusted under the LocalDumps registry entry. If needed, refer back to 'MustGather setup of error reporting dump tools for Microsoft Windows' }
Use Dr.Watson tool (an option only for OS versions prior to Windows 2008):
Run '
DRWTSN32.EXE -p CHILDPID
' to create Dr.Watson log and crash files representing the current state of the web server.
(where CHILDPID is the PID of the IHS child process as determined in the prior steps above.)If a dialog box appears stating that an error log is being created, don't press Cancel. Instead, wait for the text of the button to change to OK. Then press OK.
The Dr. Watson files can now be found in the output locations configured in the
DRWTSN32.EXE
program, as described above under System preparation. Example:C:\DrWatson_dumps>dir Volume in drive C is C_Drive Volume Serial Number is 98E7-6D3C Directory of C:\DrWatson_dumps 08/05/2009 09:32a <DIR> . 08/05/2009 09:32a <DIR> 04/05/2010 03:48p 1,118,951 drwtsn32.log 04/05/2010 03:49p 12,969,444 user.dmp 2 File(s) 14,088,395 bytes 2 Dir(s) 18,162,450,432 bytes free
The files
drwtsn32.log
anduser.dmp
are the files to save.
Copy the files into the 'ServerConfig.timestamp
' directory.
Any additional error or access log files that might be available.
The
access.log
anderror.log
files will be automatically gathered by theServerDoc DescribeConfig
tool used above, but if the configuration file has been changed to specify differently named log files then you should copy these log files from theIHS_install_root\logs\
directory to the 'ServerConfig.timestamp\files\logs
' directory.WebSphere plug-in trace file
The actual location is specified in
plugin-cfg.xml
and is generated by configuringLogLevel="Trace"
.
Example:c:\WebSphere\AppServer\logs\http_plugin.log
Copy the file into the 'ServerConfig.timestamp
' directory.Event Viewer information
Open the 'Event Viewer' (All Programs / Administrative Tools / Event Viewer)
For both the
'Application'
and'System'
logs:Select the log in the tree
Rt-click and select
'Save Log File As...'
Name each file the same as the log (i.e.
'Application'
or'System'
), and select a type of'Event Log (*.evt)'
'Save' into the '
ServerConfig.timestamp
' directory
(the directory created in the first step by running 'ServerDoc DescribeConfig')
Recap of information to send to IBM support:¶
Create a zip file of the 'ServerConfig.timestamp
' directory as
described in the System and web server information
tool documentation. Send this
ServerConfig.timestamp.zip
containing the following to IBM support for
analysis:
IHS information gathered by the
'ServerDoc DescribeConfig'
TCP connection information, as saved to file
netstat.txt
Network configuration, as saved to file
ipconfig.txt
Server status report, if it could be loaded
Task manager information, as saved to
taskmgr.doc
ortaskmgr.rtf
Web server state, as represented by the dump and log file(s) (If AFPA is disabled)
All error and access logs
WebSphere plug-in trace file
Event Viewer export files