This past week I upgraded my PHP form 5.2 to 5.3 and have seen horrible performance.
Has anyone else made this jump and experienced problems? If so how did you fix them?
One such problem originally was apache going from using about 500MB of RAM to gobbling up all 16GB!!! I made some adjustments and now it stays under 2GB but it seems like there are always ten or twenty httpd's running at 75-100% of CPU.
Any thoughts or ideas? The only change on the server was upgrading php, it ran fine before.
Comments
I kid, I kid... but PHP is pretty much a hack job held together by duct-tape and chewing gum when it comes to web development. It works, but it's not pretty and not very good (from a computer science point of view -- this isn't to say that you couldn't produce decent software using PHP).
This same client had some custom php code that was throwing errors after the upgrade. Once those errors were fixed apache stopped gobbling up RAM but in continues to show httpd (under top) running threads using near 100% CPU.
One problem I fixed early was setting the network port in the kernel to 100mbit (was set to 10mbit) and that helped a lot. It made everything faster and load stayed under five. After a few days of this load continues to creep upwards until I restart apache and then it holds good for about 48 hours.
I am thinking that something on this clients custom php site is not liking the new php. All other sites using open source and have not shown any problems.
It's getting people to adapt to things once you pass that threshold that's frustrating.
To be fair, I also hate just about every language when it's used as a hammer for a problem it doesn't quite fit.
Jeff Atwood explains the PHP situation pretty well:
http://www.codinghorror.com/blog/2012/06/the-php-singularity.html