Jonathan Kaczynski created THRIFT-1617: ------------------------------------------
Summary: TProcessPoolServer does not shutdown cleanly Key: THRIFT-1617 URL: https://issues.apache.org/jira/browse/THRIFT-1617 Project: Thrift Issue Type: Bug Components: Python - Library Affects Versions: 0.8 Environment: linux, but I assume all Reporter: Jonathan Kaczynski I haven't been able to get TProcessPoolServer to shutdown cleanly. I tried stopping TProcessPoolServer in the finally clause of a try-block around server.serve(), [https://gist.github.com/2828980], but the child processes became orphaned. Then, I tried using the code from the test I found, http://svn.apache.org/repos/asf/thrift/trunk/test/py/TestServer.py, but the processes still didn't terminate: https://gist.github.com/2829045 I commented on THRIFT-1083, and Dvir responded with an updated version of TProcessPoolServer.py: [THRIFT-1083|https://issues.apache.org/jira/browse/THRIFT-1083?focusedCommentId=13280566&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13280566]. Here's how I'm using it: https://gist.github.com/2771144 I'm sending the parent process the TERM signal, and noticed two issues: 1. The child processes won't terminate until they have attempted to field a request. If server.stop() is called before it has fielded a request, the child process will continue running until it services a request and then it will shutdown. 2. The parent process never shuts down. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira