Apache proccess get stucked with the status W (“Sending Reply),
Recently i faced a strange problem with my production apache servers. Â The Apache threads were eating up my CPU , some of the httpd threads were taking 80 to 90 % of the cpu utilization. Actually i did not touched any of my apache or any systemÂ configurations. My Â web server is running on LAMP (Linux, apache and PHP) . When the problemÂ occurs my system look like the below given screenshot.
After having some research i found out that the problem occures because of some error in programmimg . Some of Â the php scripts goes on infinite loop and never ends and it also gives httpd threads a W status.
A temporary fix would be to shorten the error time outs and reduce the max time for php execution. So just go to php.ini file and set the max_execution time to 30 seconds.