Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Daemon crashes the system

by jjimmy (Initiate)
on Nov 02, 2011 at 12:59 UTC ( #935385=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Daemon crashes the system
in thread Daemon crashes the system

RMGir, your way isn't working.


Comment on Re^3: Daemon crashes the system
Re^4: Daemon crashes the system
by RMGir (Prior) on Nov 02, 2011 at 13:06 UTC
    jjimmy, how is it failing?

    Is there an error in my code, or is your program still failing to fork in the same way it was before?

    If it's still failing to fork, it's possible that there are too many php processes still running at one time...

    Do you know how how many php processes are started before fork fails? Do all of those php processes finish running, or are some of them or all of them still running when the daemon program dies?


    Mike
      maybe not enough, only 3. if I add: $ SIG {CHLD} = 'IGNORE'; in each sub?
        I don't think I can help you any more than this - there's too much I don't know about your system.

        Have you tried using system monitoring tools to look at the machine and see what's going on? Are there a lot of php or perl processes still running? Is there one process (or one KIND of process) that's using too many resources?

        Late edit: You asked "if I add: $ SIG {CHLD} = 'IGNORE'; in each sub?" - that doesn't matter, the $SIG{CHLD} setting is global - it affects the whole program. As long as you do it before the first "fork", it's fine.


        Mike

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://935385]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2014-12-29 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (190 votes), past polls