PHP5-FPM doesn't always restart on 10.10

Bug #744371 reported by Steve Corona
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: php5-fpm

The init script for PHP5-FPM doesn't handle restarts correctly. When you restart an active PHP5-FPM process, it'll sometimes shutdown the old process, but the new process won't spawn any children and handle requests.

I think whats happening is that the new PHP5-FPM process is trying to grab the FastCGI Port while the old process is still shutting down, causing the new PHP5-FPM process to fail.

Either way, this can be fixed by changing restart to use graceful-stop instead of stop

Currently it does-
   restart)
 $0 stop
 $0 start
    ;;

This needs to become
    restart)
 $0 graceful-stop
 $0 start
    ;;

Description: Ubuntu 10.10
Release: 10.10

php5-fpm:
  Installed: 5.3.3-1ubuntu9.3
  Candidate: 5.3.3-1ubuntu9.3
  Version table:
 *** 5.3.3-1ubuntu9.3 0
        500 http://mirrors.service.softlayer.com/ubuntu/ maverick-updates/universe amd64 Packages
        500 http://mirrors.service.softlayer.com/ubuntu/ maverick-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     5.3.3-1ubuntu9 0
        500 http://mirrors.service.softlayer.com/ubuntu/ maverick/universe amd64 Packages

Tags: maverick natty
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I can't reproduce this, but then I don't have any sort of load on the service...

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I note that the current debian unstable package in effect does the same thing, through its use of do_start which calls start-stop-daemon with the --retry option.

Can anyone confirm they have seen this bug?

I think it is probably a good idea to follow the bug submitter's proposal anyway, but am afraid that without confirmation we wont' be able to get SRU approval.

Changed in php5 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ah, I see - this is still the case in natty.

Chuck Short (zulcss)
Changed in php5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Ondřej Surý (ondrej) wrote :

Just as a side note: I don't think that Debian is affected, because do_stop tries really hard to kill everything...

Revision history for this message
rynop (ryan-pendergast) wrote :

This happens quite frequently for me on 10.10 32 bit and 64 bit. I can't figure out why but I can re-produce easily. If anyone has an idea on what may fix it, i can test it out since i can reproduce.

Revision history for this message
Thomas Ward (teward) wrote :

Hello, and thanks for filing a bug to try and make Ubuntu better!

This is currently filed against Ubuntu Maverick (10.10), which is no longer supported. Can you please test this bug against 11.10, which is a currently-supported version of Ubuntu, or any other currently-supported release of Ubuntu? (I am skipping 11.04, as it will EndOfLife at some point this month)
------
Thomas Ward
Ubuntu BugSquad Member

tags: added: maverick
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I can't reproduce this in oneiric, and the init script has changed quite
a bit there.

Thomas Ward (teward)
tags: added: natty
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Marked Fix released. It should be fixed in oneiric+. With one month left in natty, we don't believe it is worth targetting the bug at natty at this point.

Changed in php5 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.