I'm having trouble getting the reforking to work properly. When the daemon gets to the allotted percentage of memory (i.e. 85%), it starts to refork. Running drush daemon-name status shows 'daemon is currently reforking' but it never resumes processing. The old process ID no longer exists if I check for it with top -p pid, but a new process ID isn't created.

I see that the protected function resume() is commented out in drushdaemon.inc, but it doesn't seem to be called from anywhere?

Any pointers would be appreciated.

Comments

q0rban’s picture

Hmm, can you think of ways to walk me through replicating this? Do you get the same behavior if you lower PHP's memory limit and run the example drush nar daemon?

Thanks!

tsphethean’s picture

I am seeing the same issue with reforking - the process runs fine up until memory reaches its threshold, then the daemon status moves to reforking but never actually returns a child process.

Best way to replicate would be to lower the memory threshold really low, so that essentially your daemon tries to refork as soon as it starts - you should observe none of your commands being executed.

alexpott’s picture

Had this same problem because of the way drush escape's shell commands. See solution here http://drupal.org/node/1437762

kostajh’s picture

Thanks for the reference @alexpott. Based on #1437762: Backend drush command reparsed by escapeshellcmd() which causes issues if you're using a drush.ini file, is it correct that `drushd` is not compatible with Drush 5.x?

alexpott’s picture

Yep drushd is definitely not compatible with drush5... there are a couple of interesting features in d5... especially concurrancy... so a daemon could spawn multiple processes...

kostajh’s picture

The solution put forward by @alexpott in #1437762: Backend drush command reparsed by escapeshellcmd() which causes issues if you're using a drush.ini file solves the problem with reforking. Maybe a note should be made of this in the module README or the project page? On the other hand I'm sure anyone who wants to use drushd would read this, so, perhaps this issue should just be left open until Drush 5 compatibility is in place.

laceysanderson’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

Unfortunately version 6.x-1.x will no longer be supported.