I am running a busy banner exchange on Linux-PHP-MySql and recently
moved it to a new and bigger server Dual Zeon 3.2G with cPanel, Apache
1.3.37 and PHP 4.4.4. The old machine was Dual Zeon 2.0, no cPanel,
Apache 2.0.46 and PHP 4.3.2 . Both machines have 2G RAM. On the old
server it worked without any problems, but on the new machine it
showed the following problems:
Right out of the box the new webserver would pile up and reject
connections while only working at 10% of its CPU capacity. I did some
performance tuning by tweaking values in httpd.conf, php.ini and
my.cnf. It improved things, but once in every two-three days the
server would go into a very "slow mode" with many "defunct" apache
processes while CPU usage never exceeded 25% and a lot of free memory
available. No memory swapping. The "slow mode" always occurred
suddenly, not gradually, with a noticeable bandwidth decrease on the
server's chart. Restarting Apache would fix the issue until the next
time the 'slow mode' occurred. I never figured what causes Apache to
slow down with so much available CPU power and memory.
Finally, this morning it went into its "slow mode" again, except this
time restarting did not help, and even rebooting machine did not help.
I moved the app back to the old server with the database running on
the new machine.
I decided the problem might be due to the old Apache version, and to
upgrade Apache from 1.3 to 2.x. But my "Stable cPanel" did not support
2.0. Only the "bleeding edge" cPanel version currently supports Apache
2.0. So, I upgraded cPanel to the "edge" version and then attempted to
upgrade Apache. Tried several times with various configs but the
upgrade always failed with the error "postcheck() returned a failed
status" , apparently because of the bugs in the "edge" cPanel version.
Then I downgraded cPanel back to "Stable" version and attempted to
upgrade PHP version to 5.1.6 But the upgrade failed with make errors
and Apache would not restart. I attempted to reisntall Apache with the
"default" options - with same result - make errors and Apache does not
start.
At this point I am not sure what to do next. I need assistance fixing
Apache and PHP and figuring and fixing the case of the initial problem
to allow Apache utilize all the available resources on the machine and
never go into the "slow mode" again.
Any additional information will be provided on request.
Thank you. |