1 httpd process with 75% of CPU resources won't die! reboot of httpd required

  • Racking my brains here - 5 days now.

    Installed 2.0.1 version of VB and wanting to make switch from UBB.

    As expected, since this is an APACHE based php, VB is opening an httpd process, but, it NEVER DIES until I physically reboot httpd via telnet. One httpd process (or more if I move around in the program) lingers forever and ends up using every bit of CPU usage. This happens when I go anywhere in the program (it doesn't matter which page). I do not have it live since that would kill the server in just a few seconds.

    Current PHP version: 4.0.0 Zend engine version: 1.00
    mySQL is version 3.22, however, phpinfo lists the client as 3.23.10-alpha (not sure why)
    LINUX Redhat 6.2 with 2.2 kernel
    Apache/1.3.12 (Unix) PHP/4.0.0 mod_ssl/2.6.6 OpenSSL/0.9.5a
    machine is a 500mhz PIII with 9 gig HD and RAID 1 9 gig mirror
    think thats about it for this part.

    Now interestingly, I have an ad serving program that uses mysql, but, it runs through a perl program. It works fine and has for over a year - serving over 150,000 ads a day with absolutely no problems. So, I would venture to say mySQL is fine. Also, VB does write to the database I set up for it just fine. I checked this through PhpMyAdmin.

    Also, phpinfo works without a hitch so php appears to be running ok. I also scripted both persisitant and non-persistant code which connects to the mySQL database into some blank pages and ran them - they also worked fine. Testing the php mysql connection. Neither one caused any problems. No lingering httpd's and consequently, no massive CPU loads.

    STANDARD CONNECTION & CLOSING USED:

    $linkid = mysql_connect("hostname", "username",
    "password");
    echo "connected";
    mysql_close($linkid);

    ?>

    PERSISTANT CONNECTION USED:


    $linkid = mysql_pconnect("hostname", "username",
    "password");
    echo "connected";

    ?>

    To compile the 4.0.0 php this was the configure command:
    './configure' '--with-mysql' '--with-mssql' '--with-imap' '--with-apache=../apache_1.3.12' '--enable-track-vars'

    I noticed in post (I have read them all the last couple of days)

    http://vbulletin.com/forum/showthread.php?
    &threadid=3114&perpage=15&pagenumber=1

    that they used the following configuration:

    # ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --with-apxs=/usr/sbin/apxs --enable-track-vars --enable-magic-quotes --enable-debugger

    I used this script because I was thinking that an upgrade to php might help. I got a warning when I configured that this was a compile for php with built-in MySql support. If compiling a server module and intend to use other server modules that also use MySQL (mod_perl ...) this configuration must be built with local MySQL support files. --with-mysql=/path/to/mysql. No problem except wouldn't this still point to the potential problem? I do run mod_perl so this is an issue. I have not compiled this into apache yet as I do not want to mess anything up. Consequently the 4.0.0 configuration and program is still in use.


    MORE INFO:

    NORMAL OPERATION OF SERVER:
    11:35am up 16 min, 1 user, load average: 0.81, 0.90, 0.65
    79 processes: 76 sleeping, 2 running, 1 zombie, 0 stopped
    CPU states: 6.3% user, 0.9% system, 0.3% nice, 92.2% idle


    OPERATION AFTER VB IS OPENED (it doesn't matter what page)
    9:51am up 47 min, 1 user, load average: 20.55, 19.10, 17.40
    125 processes: 129 sleeping, 2 running, 1 zombie, 0 stopped
    CPU states: 91.2% user, 8.8% system, 0.0% nice, 0.0% idle

    I actually had one httpd process that ran for over an hour and used 75% of the CPU resources. Not good!

    On Apache restart here is
    some info it spits out - I'm not sure if this is normal (I don't remember
    ever seeing it before) here is the stuff:

    [root@abc admin]# /etc/rc.d/init.d/httpd restart
    Stopping httpd
    kill: (9640) - No such pid
    kill: (8651) - No such pid
    kill: (8650) - No such pid
    kill: (8638) - No such pid
    kill: (7290) - No such pid
    kill: (7289) - No such pid
    kill: (7288) - No such pid
    kill: (7287) - No such pid
    kill: (7286) - No such pid
    kill: (7285) - No such pid
    kill: (7284) - No such pid
    kill: (7283) - No such pid
    kill: (7282) - No such pid
    kill: (7281) - No such pid
    kill: (7280) - No such pid
    kill: (7279) - No such pid
    kill: (7278) - No such pid
    kill: (7277) - No such pid
    kill: (7276) - No such pid
    kill: (7275) - No such pid
    kill: (7274) - No such pid
    kill: (7273) - No such pid
    kill: (7267) - No such pid
    kill: (7266) - No such pid
    kill: (7265) - No such pid
    kill: (7264) - No such pid
    kill: (7263) - No such pid
    kill: (7262) - No such pid
    kill: (7261) - No such pid
    kill: (7260) - No such pid
    kill: (7259) - No such pid
    kill: (7258) - No such pid
    kill: (7257) - No such pid
    kill: (7256) - No such pid
    kill: (7255) - No such pid
    kill: (7254) - No such pid
    kill: (7253) - No such pid
    kill: (7252) - No such pid
    kill: (7251) - No such pid
    kill: (7250) - No such pid
    [FAILED]
    Starting httpsd with SSL

    Why is httpd running with SSL? why does this show a fail? (I imagine some of these precesses are online users.) Could this be part of the problem?

    I don't know enough about APACHE or php or mysql to figure this out - I am smart enough to know about enough to really mess things up! Thanks for the help!

    Kevin


  • I am having the exact same problem. I installed today---about an hour after--my server needed rebooting. I'm glad I ran top in telnet.
    just to be sure, I rebooted and watched usage for about 15 minutes. I then went to my forum and about 80% of my processor was being used---even after I closed my web browser. I had to reboot again. it hasn't been rebooted in 4 months. this is on a dedicated server.
    I'm running php 4
    mysql 3.23.38

    I hope there's an easy answer for this one (I hope you've heard it before)
    a quick reply will be greatly appreciated.
    Thanks.


  • I would suggest first of all to upgrade to php4.0.6, it's a lot better in saving server resources

    Then upgrade to mySQL 2.23.39, a big improvement over 3.22.XX

    Apache 1.3.20 is also alot better than 1.3.12, there is a big difference between Apache 1.3.12 and 1.3.13 and up

    Try these upgrades first and then see the top again.


  • Look at this! This is occurring with one user online! Come On Gurus! Please help me out here!


    11:03pm up 15:04, 4 users, load average: 29.05, 21.91, 14.44
    140 processes: 103 sleeping, 33 running, 4 zombie, 0 stopped
    CPU states: 89.2% user, 10.3% system, 0.3% nice, 0.0% idle
    Mem: 905872K av, 560524K used, 345348K free, 259456K shrd, 85684K buff
    Swap: 273064K av, 0K used, 273064K free 339028K cached

    PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
    5040 www 20 0 5184 5184 2904 R 0 5.7 0.5 17:11 httpd
    5066 www 20 0 5408 5408 2936 R 0 5.1 0.5 0:18 httpd
    22571 www 20 0 5340 5340 2932 R 0 5.1 0.5 0:32 httpd
    5043 www 19 0 5228 5228 2928 R 0 4.9 0.5 14:54 httpd
    21795 www 20 0 5024 5024 2888 R 0 4.9 0.5 0:38 httpd
    13617 www 20 0 5456 5456 2928 R 0 4.3 0.6 0:36 httpd
    5054 www 20 0 5444 5444 2932 R 0 3.9 0.6 0:34 httpd
    5055 www 20 0 5488 5488 2944 R 0 3.9 0.6 0:39 httpd
    23897 www 20 0 2328 2328 888 R 0 3.6 0.2 0:00 UBonline.cgi
    23898 www 20 0 2312 2312 888 R 0 3.6 0.2 0:00 UBonline.cgi
    5068 www 18 0 5104 5104 2904 R 0 3.4 0.5 0:03 httpd
    19943 www 14 0 5052 5052 2892 R 0 3.2 0.5 0:03 httpd
    23879 www 15 0 2712 2712 952 R 0 3.0 0.2 0:00 UBonline.cgi
    5067 www 14 0 5364 5364 2936 R 0 2.8 0.5 0:36 httpd
    22023 admin 13 0 924 924 668 R 0 2.8 0.1 0:16 top
    23894 www 18 0 2200 2200 1000 R 0 2.8 0.2 0:00 banners.pl
    5047 www 16 0 5244 5244 2924 R 0 2.4 0.5 0:05 httpd


  • WWWIll,

    I'm glad someone else is experienceing this (no hard feelings WWWill) - that means there is more than even us! The bad thing is that it's happening to me and you! Always seems to be my luck.

    I'm sure someone is getting ready to help us out here - any second now!

    WWWill, If you figure it out please let me know. I will do likewise.

    Hey I don't know if this may have anything to do with it, but, are you running an SSL version of APACHE?

    WAITING FOR THE BIG GUNS TO JUMP IN HERE AND HELP OUT!

    Ran our server 0ver 185 days without a reboot and this was at over 100,000 page views a day average (about 15,000 unique visits a day). LONG LIVE LINUX!!!!!!!!!

    THANKS TO ALL OF THOSE WHO POST HERE REGULARLY IN ADVANCE FOR JUMPING ON IN HERE AND HELPING OUT!!! I LISTED EVERYTHING YOU RECOMMENDED in the post above, I ALSO READ LITERALLY EVERYTHING I COULD GET MY HANDS ON TO FIND OUT WHAT THE PROBLEM IS - ALL TO NO AVAIL!


    PPPPPLLLLLLLEEEEAAAAASSSSSEEEE!
    GIVE ME AND MY FRIEND WWWILL HERE A HAND. THANKS!


    p.s. "MIKE" THE SUPPORT GUY SAID TO POST THIS HERE AS WELL AS IN THE TROUBLE TICKET I OPENED. Don't let Mike down and not give us a hand :D :D

    WWWill - don't reboot LINUX, you only need to restart APACHE as this is the process (httpd) that is stuck open! With my machine it's in the etc/rc.d/init.d/ directory simply go there and type - httpd restart
    That is unless you can't even get in via telnet - had this happen once in the past. Killed my server record.

    Thanks in advance php guru's for your help!


  • reaaaaallllyyy need some help on this :D







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about 1 httpd process with 75% of CPU resources won't die! reboot of httpd required , Please add it free.