Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I got Apache 2.4 with mod_proxy_fastcgi, PHP 5.4 with PHP-fpm installed and i've separated every site with a pool.

I got a page that posts info to a php application that runs a script on the webserver updating vhosts and pools then reloads apache and php-fpm to reflect the changes.

/etc/init.d/php-fpm reload

/./usr/local/apache2/bin/apachectl graceful

I've read that doing it this way will respect the current connections/workers and not interrupt the services. Now, the script runs fine and everything is done correctly but the return page of the php application contains.

"Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later". I've tested with a php script that sleeps for 60 seconds then runs phpinfo() and that works. 

In my apache error_log i can find

Connection reset by peer: [<client>] AH01075: Error dispatching request to :, referer: <site>

So am i doing something wrong or aren't the current connections being handled? If i comment out the reloads of apache and php-fpm the return page works fine but obviously my changes are not updated.

Any ideas of what im doing wrong or how i can do it correctly? I'd be outmost grateful for any guidance.

Edit: Perhaps reloading the services in the script just wont work even though the services aren't actually interrupted. Instead maybe use a cronjob to restart them every 10 minutes or so?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.