Litespeed on 100% when I click on /wp-admin/plugin-install.php

#1
Hello,

Just installed Litespeed enterprise and compiled PHP 5.3.8.
My server is CentOS 6/64bit

Then I moved my Wordpress site over to new server but when I try to install new plugin (/wp-admin/plugin-install.php) Litespeed goes to 100% (CPU load) and hangs there for about 1 minute. Web server is unavailable at this time and cannot send any page.

here is the complete debug log:

Code:
Time	Level	Message
2011-09-25 10:46:30.556	NOTICE	Toggle debug logging request from admin interface!
2011-09-25 10:46:30.557	NOTICE	[Child: 23384] Start shutting down gracefully ...
2011-09-25 10:46:30.557	NOTICE	New litespeed process is ready, stop listeners
2011-09-25 10:46:30.557	INFO	Stop listener *:80.
2011-09-25 10:46:30.557	INFO	Stop listener *:7080.
2011-09-25 10:46:30.557	NOTICE	[AutoRestarter] new child process with pid=23868 is forked!
2011-09-25 10:46:30.557	NOTICE	[AutoRestarter] new child process with pid=23869 is forked!
2011-09-25 10:46:30.557	NOTICE	[child: 23868] Successfully change current user to nobody
2011-09-25 10:46:30.557	NOTICE	[Child: 23868] Core dump is enabled.
2011-09-25 10:46:30.557	NOTICE	[Child: 23868] Setup swapping space...
2011-09-25 10:46:30.557	INFO	Stop listener *:7080.
2011-09-25 10:46:30.557	NOTICE	[Child: 23868] LiteSpeed/4.1.4 Enterprise starts successfully!
2011-09-25 10:46:30.557	NOTICE	[child: 23869] Successfully change current user to nobody
2011-09-25 10:46:30.558	NOTICE	[Child: 23869] Core dump is enabled.
2011-09-25 10:46:30.558	NOTICE	[Child: 23869] Setup swapping space...
2011-09-25 10:46:30.558	NOTICE	[Child: 23869] LiteSpeed/4.1.4 Enterprise starts successfully!
2011-09-25 10:46:30.560	DEBUG	[UDS://tmp/lshttpd/admin_php.sock] add recycled connection to connection pool!
2011-09-25 10:46:37.060	DEBUG	[idle] Idle connection timed out, close!
2011-09-25 10:46:37.061	DEBUG	[idle] [ExtConn] close()
2011-09-25 10:46:52.599	DEBUG	[95.105.192.34:47837-13#www.pctips3000.com] HttpIOLink::handleEvents() events=1!
2011-09-25 10:46:52.599	DEBUG	[95.105.192.34:47837-13#www.pctips3000.com] HttpIOLink::suspendRead()...
2011-09-25 10:46:52.752	INFO	[HTAccess] Updating configuration from [/home/www.pctips3000.com/public_html/.htaccess]
2011-09-25 10:46:52.798	DEBUG	[95.105.192.34:47837-13#www.pctips3000.com] peer connection close detected!
2011-09-25 10:46:52.798	DEBUG	[95.105.192.34:47837-13#www.pctips3000.com] HttpExtConnector::cleanUp() ...
2011-09-25 10:46:52.798	DEBUG	[95.105.192.34:47837-13#www.pctips3000.com] abort request...
2011-09-25 10:46:52.798	DEBUG	[95.105.192.34:47837-13#www.pctips3000.com] [LSAPI] send abort packet!
2011-09-25 10:46:52.798	DEBUG	[95.105.192.34:47837-13#www.pctips3000.com] release ExtProcessor!
2011-09-25 10:46:52.799	DEBUG	[idle] [ExtConn] close()
2011-09-25 10:46:52.799	DEBUG	[uds://tmp/lshttpd/www.pctips3000.com_lsphp.sock] add recycled connection to connection pool!
2011-09-25 10:46:52.799	DEBUG	[95.105.192.34:47837-13#www.pctips3000.com] Close socket ...
2011-09-25 10:46:52.799	DEBUG	[95.105.192.34:47837-13#www.pctips3000.com] Available Connections: 2000
2011-09-25 10:46:52.799	NOTICE	[Child: 23384] Shut down successfully!
2011-09-25 10:46:52.799	NOTICE	[lsphp5] stop worker processes
2011-09-25 10:46:52.799	DEBUG	[idle] [ExtConn] close()
2011-09-25 10:46:52.799	INFO	[lsphp5] kill pid: 23771
2011-09-25 10:46:52.799	NOTICE	[www.pctips3000.com_lsphp] stop worker processes
2011-09-25 10:46:52.799	DEBUG	[www.pctips3000.com_lsphp] kill pid 23848 associated with ProcInfo
2011-09-25 10:46:52.799	INFO	[www.pctips3000.com_lsphp] kill pid: 23864
2011-09-25 10:46:52.799	NOTICE	[AdminPHP] stop worker processes
2011-09-25 10:46:52.799	INFO	Permission denied, let parent kill it: 23779
2011-09-25 10:46:52.799	DEBUG	[AdminPHP] kill pid 23779 associated with ProcInfo
2011-09-25 10:46:52.799	DEBUG	[idle] [ExtConn] close()
2011-09-25 10:46:52.800	NOTICE	[AutoRestarter] cleanup children processes and unix sockets of process with pid=23384 !
2011-09-25 10:46:52.800	INFO	[CLEANUP] Clean up child process with pid: 23771
2011-09-25 10:46:52.800	INFO	[CLEANUP] Clean up child process with pid: 23779
2011-09-25 10:46:52.801	INFO	[CLEANUP] Clean up child process with pid: 23848
2011-09-25 10:46:52.801	INFO	[CLEANUP] Clean up child process with pid: 23864
2011-09-25 10:46:52.901	NOTICE	[AutoRestarter] child process with pid=23384 exited with status=0!
2011-09-25 10:47:11.353	NOTICE	[Child: 23385] Start shutting down gracefully ...
2011-09-25 10:47:11.353	NOTICE	New litespeed process is ready, stop listeners
2011-09-25 10:47:11.353	INFO	Stop listener *:80.
2011-09-25 10:47:11.353	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] HttpIOLink::handleEvents() events=1!
2011-09-25 10:47:11.353	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] HttpIOLink::suspendRead()...
2011-09-25 10:47:11.353	DEBUG	[idle] ExtConn::onRead()
2011-09-25 10:47:11.353	DEBUG	[idle] LsapiConn::doRead()
2011-09-25 10:47:11.353	DEBUG	[idle] process packet header -1 bytes
2011-09-25 10:47:11.353	DEBUG	[idle] [ExtConn] close()
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] ExtConn::onRead()
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] LsapiConn::doRead()
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] process packet header 8 bytes
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] process response stream 32 bytes, packet left: 24
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] HttpExtConnector::processRespBodyData()
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] process packet header 8 bytes
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] [EXT] EndResponse( endCode=0, protocolStatus=0 )
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] release ExtProcessor!
2011-09-25 10:47:11.373	DEBUG	[uds://tmp/lshttpd/www.pctips3000.com_lsphp.sock] add recycled connection to connection pool!
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] endDynResp() end GZIP stream.
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] HttpIOLink::continueWrite()...
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] write resumed!
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] HttpIOLink::handleEvents() events=4!
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] Written to client: 22
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] writeRespBody() return 16
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] ReqBody: 0, RespBody: 10024, HEC_COMPLETE!
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] m_pHandler->onWrite() return 0
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] Written to client: 7
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] HttpConnection::flush()!
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] HttpConnection::nextRequest()!
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-13#www.pctips3000.com] HttpExtConnector::cleanUp() ...
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-14] HttpIOLink::handleEvents() events=1!
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-14] HttpConnection::onReadEx(), state: 0!
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-14] readToHeaderBuf().
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-14] End of stream detected, CLOSING!
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-14] Read from client: -1
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-14] readToHeaderBuf() return 0.
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-14] Close socket ...
2011-09-25 10:47:11.373	DEBUG	[95.105.192.34:40146-14] Available Connections: 2000
2011-09-25 10:47:11.373	NOTICE	[Child: 23385] Shut down successfully!
2011-09-25 10:47:11.373	NOTICE	[lsphp5] stop worker processes
2011-09-25 10:47:11.373	INFO	[lsphp5] kill pid: 23775
2011-09-25 10:47:11.373	NOTICE	[www.pctips3000.com_lsphp] stop worker processes
2011-09-25 10:47:11.373	DEBUG	[www.pctips3000.com_lsphp] kill pid 23798 associated with ProcInfo
2011-09-25 10:47:11.373	DEBUG	[idle] [ExtConn] close()
2011-09-25 10:47:11.375	NOTICE	[AutoRestarter] cleanup children processes and unix sockets of process with pid=23385 !
2011-09-25 10:47:11.375	INFO	[CLEANUP] Clean up child process with pid: 23775
2011-09-25 10:47:11.375	INFO	[CLEANUP] Clean up child process with pid: 23798
2011-09-25 10:47:11.475	NOTICE	[AutoRestarter] child process with pid=23385 exited with status=0!
2011-09-25 10:48:01.076	INFO	Remove pid: 23872, exitcode: 129
2011-09-25 10:57:01.397	INFO	Remove pid: 23870, exitcode: 0
2011-09-25 11:03:00.784	INFO	[69.171.228.244:46999-0#Example] File not found [/usr/local/lsws/DEFAULT/html/facebook/fbpostremove.jsp]
2011-09-25 11:11:21.411	INFO	Remove pid: 24125, exitcode: 0
2011-09-25 11:16:00.946	INFO	[HTAccess] Updating configuration from [/home/www.pctips3000.com/public_html/.htaccess]
2011-09-25 11:17:11.018	INFO	Remove pid: 24426, exitcode: 129
I don't know what's causing this. I read some thread where there was a similar issue because of curl, but when I tried simple curl example in separate script it worked OK.
btw: here is my curl info from phpinfo() :
Code:
cURL support	enabled
cURL Information	7.19.7
Age	3
Features
AsynchDNS	No
Debug	No
GSS-Negotiate	Yes
IDN	Yes
IPv6	Yes
Largefile	Yes
NTLM	Yes
SPNEGO	No
SSL	Yes
SSPI	No
krb4	No
libz	Yes
CharConv	No
Protocols	tftp, ftp, telnet, dict, ldap, ldaps, http, file, https, ftps, scp, sftp
Host	x86_64-unknown-linux-gnu
SSL Version	NSS/3.12.6.2
ZLib Version	1.2.3
libSSH Version	libssh2/1.2.2
Please help me with this. Thank you in advance.
 
#3
Hello, I figured it out. It was caused by plugin with name: "Improved Plugin Installation".
You can simply reproduce the error.
1. Install plugin "Improved Plugin Installation"
2. Click on "Add new" plugin link
It will raise your CPU usage to 100 perc.
Please investigate it more. Thank you.
 
Last edited:

webizen

Well-Known Member
#4
It is the PHP code issue, not with LiteSpeed. lshttpd has to process the error message if received, thus high CPU usage.

2011-09-26 14:31:12.561 [NOTICE] [10.8.0.10:61194-0#APVH_xxxxx.com:lsapi] [STDERR] PHP Warning: current() expects parameter 1 to be array, null given in /home/lstestc/public_html/wordpress/wp-includes/plugin.php on line 403
2011-09-26 14:31:12.561 [NOTICE] [10.8.0.10:61194-0#APVH_xxxxx.com:lsapi] [STDERR] PHP Warning: next() expects parameter 1 to be array, null given in /home/lstestc/public_html/wordpress/wp-includes/plugin.php on line 407
A wordaround is patching the code /wp-includes/plugin.php as follows:

replace the below block (from line 403)
Code:
      do {
              foreach ( (array) current((array) ($wp_filter[$tag])) as $the_ )
                      if ( !is_null($the_['function']) )
                              call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));

      } while ( next($wp_filter[$tag]) !== false );
with

Code:
        foreach ((array) ($wp_filter[$tag]) as $tmp ) {
                foreach ( $tmp as $the_ )
                 if ( !is_null($the_['function']) )
                              call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
        }
That will prevent stderr and high CPU usage.
 
Last edited:
Top