Message8926

Author smetz
Recipients smetz
Date 2014-08-14.23:59:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408060754.49.0.602996998381.issue2192@psf.upfronthosting.co.za>
In-reply-to
Content
We are currently using Django 1.7, Jython 2.7b3+ and django-jython 1.7.0b2 to run our server.
Commit https://github.com/jythontools/jython/commit/348b63a04e2b20ca8b91bd367b7f778d66379381
to solve issue http://bugs.jython.org/issue2094 is causing requests to hang indefinitely.

This change seems to be the root of the issue:

@@ -818,19 +881,21 @@ def connect_ex(self, addr):

     def listen(self, backlog):
         self.socket_type = SERVER_SOCKET
+        self.child_queue = ArrayBlockingQueue(backlog)
+        self.accepted_children = 1  # include the parent as well to simplify close logic

         b = ServerBootstrap()
-        self.group = NioEventLoopGroup(10, DaemonThreadFactory())
-        b.group(self.group)
+        self.parent_group = NioEventLoopGroup(2, DaemonThreadFactory("Jython-Netty-Parent-%s"))
+        self.child_group = NioEventLoopGroup(2, DaemonThreadFactory("Jython-Netty-Child-%s"))
+        b.group(self.parent_group, self.child_group)

Increasing the number of threads from 2 seemed to prevent the problem.
History
Date User Action Args
2014-08-14 23:59:14smetzsetrecipients: + smetz
2014-08-14 23:59:14smetzsetmessageid: <1408060754.49.0.602996998381.issue2192@psf.upfronthosting.co.za>
2014-08-14 23:59:14smetzlinkissue2192 messages
2014-08-14 23:59:14smetzcreate