<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><div><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">I wonder why you decided to use Ampoule to manage a single child process <br>(that apparently shouldn't be restarted when it exits)? </blockquote></div><p>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.</p><div><div><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">I think Ampoule's purpose is to make it easy to run many processes and <br>automatically restart them from time to time. </blockquote></div><p>I agree. Though it’s also very useful as an drop–in implementation of a Twisted spawnProcess for one single other process.</p><div><div><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">It sounds like the basic process support included in Twisted, <br>reactor.spawnProcess, could address your requirements. </blockquote></div><p>I have just found your answer here: </p><p><a href="https://stackoverflow.com/questions/6678763/simple-example-with-spawnprocess">https://stackoverflow.com/questions/6678763/simple-example-with-spawnprocess</a></p><p>which seems useful. If nothing else works, I will try to reduce complexity by converting this to bare spawnProcess. </p><p>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. </p><p>Best,</p><p>Burak</p><div><br class="Apple-interchange-newline"></div></div></div></div> <div id="bloop_sign_1394353170156295936" class="bloop_sign"></div> <div style="color:gray"><hr style="style:linear">From: <span style="color:black">exarkun@twistedmatrix.com</span> <a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a><br>Reply: <span style="color:black">Twisted general discussion</span> <a href="mailto:twisted-python@twistedmatrix.com">twisted-python@twistedmatrix.com</a><br>Date: <span style="color:black">March 3, 2014 at 4:21:42 AM</span><br>To: <span style="color:black">Twisted general discussion</span> <a href="mailto:twisted-python@twistedmatrix.com">twisted-python@twistedmatrix.com</a><br>Subject: <span style="color:black"> Re: [Twisted-Python] Freezing Ampoule or the Invasion of Infinite Zombie Processes <br></span></div> <blockquote type="cite" class="clean_bq"><span><div><div>On 06:34 am, burak@nehbit.net wrote:
<br>>Hi everyone,
<br>>
<br>>It seems that I ran into a rather inextricable problem, would love to  
<br>>see what you think.
<br>>
<br>>As you might remember, I have been working on a distributed, anonymous  
<br>>community platform(s) called Aether ( www.getaether.net ) which is  
<br>>largely a Twisted codebase in its networking system. After releasing  
<br>>the app, I ended up with performance problems, in some part due to my  
<br>>programming incompetence, and some part because I was also using it to  
<br>>drive a GUI with qtreactor, which ran its own Javascript interpreter.
<br>>
<br>>The codebase is largely cleaned up now and the current architecture of  
<br>>the program involves two processes that talk to each other via Ampoule:  
<br>>a default reactor core, which handles network events, and a qtreactor  
<br>>which is solely concerned with the user interface. It works very well.  
<br>>Stress induced by networking does not slow down the UI and vice versa.
<br>
<br>I wonder why you decided to use Ampoule to manage a single child process  
<br>(that apparently shouldn't be restarted when it exits)?
<br>
<br>I think Ampoule's purpose is to make it easy to run many processes and  
<br>automatically restart them from time to time.
<br>
<br>It sounds like the basic process support included in Twisted,  
<br>reactor.spawnProcess, could address your requirements.
<br>
<br>Jean-Paul
<br>
<br>_______________________________________________
<br>Twisted-Python mailing list
<br>Twisted-Python@twistedmatrix.com
<br>http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
<br></div></div></span></blockquote></body></html>