[Twisted-Python] Freezing Ampoule or the Invasion of Infinite Zombie Processes

Burak Nehbit burak at nehbit.net
Sun Mar 9 01:31:33 MST 2014


I wonder why you decided to use Ampoule to manage a single child process 
(that apparently shouldn't be restarted when it exits)? 
Mostly because Ampoule handles quite a bit of stuff behind the scenes. I didn’t want to use it per se—to not add extra complexity to the stack, chiefly—but it was the only way I could get it to work. It also gives me a very nice AMP interface which I am already familiar with, and that allows me to communicate with my frontend very liberally.

I think Ampoule's purpose is to make it easy to run many processes and 
automatically restart them from time to time. 
I agree. Though it’s also very useful as an drop–in implementation of a Twisted spawnProcess for one single other process.

It sounds like the basic process support included in Twisted, 
reactor.spawnProcess, could address your requirements. 
I have just found your answer here: 

https://stackoverflow.com/questions/6678763/simple-example-with-spawnprocess

which seems useful. If nothing else works, I will try to reduce complexity by converting this to bare spawnProcess. 

Any ideas on what might be going wrong in my current stack? After all, processes being repeatedly created is just a symptom of something going wrong in the process very early, so ampoule tries to spawn another one. I am mainly looking to find a way to see the exception and where it happens. Twisted’s logging module seem to kick in too late. 

Best,

Burak


From: exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Reply: Twisted general discussion twisted-python at twistedmatrix.com
Date: March 3, 2014 at 4:21:42 AM
To: Twisted general discussion twisted-python at twistedmatrix.com
Subject:  Re: [Twisted-Python] Freezing Ampoule or the Invasion of Infinite Zombie Processes  
On 06:34 am, burak at nehbit.net wrote:  
>Hi everyone,  
>  
>It seems that I ran into a rather inextricable problem, would love to  
>see what you think.  
>  
>As you might remember, I have been working on a distributed, anonymous  
>community platform(s) called Aether ( www.getaether.net ) which is  
>largely a Twisted codebase in its networking system. After releasing  
>the app, I ended up with performance problems, in some part due to my  
>programming incompetence, and some part because I was also using it to  
>drive a GUI with qtreactor, which ran its own Javascript interpreter.  
>  
>The codebase is largely cleaned up now and the current architecture of  
>the program involves two processes that talk to each other via Ampoule:  
>a default reactor core, which handles network events, and a qtreactor  
>which is solely concerned with the user interface. It works very well.  
>Stress induced by networking does not slow down the UI and vice versa.  

I wonder why you decided to use Ampoule to manage a single child process  
(that apparently shouldn't be restarted when it exits)?  

I think Ampoule's purpose is to make it easy to run many processes and  
automatically restart them from time to time.  

It sounds like the basic process support included in Twisted,  
reactor.spawnProcess, could address your requirements.  

Jean-Paul  

_______________________________________________  
Twisted-Python mailing list  
Twisted-Python at twistedmatrix.com  
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20140309/19d923e2/attachment-0002.html>


More information about the Twisted-Python mailing list