I have a Python-Project for which I created a CherryPy-Webservice-Wrapper to access it via a Java-Client (a self developed Eclipse plugin in particular). The CherryPy-Server is also started from Java as an external process:
Runtime.getRuntime().exec("python C:/Coding/Projects/p1/CherryPyServer.py " + port);
To operate the CherryPy-Server from the Java-Client, I use this:
new URL("http://localhost:" + port + "/" + conf).openStream();
For testing I also access CherryPy with my Browser (Google Chrome). But after a while, with a new request CherryPy doesn't react anymore, in Java and also in Chrome (Chrome shows a slowly left-spinning wheel), meaning the client doesn't get an answer from CherryPy. This happens unreproducible, so I never can say when it happens. Also this only happens when I start CherryPy as an external process from Java. When I start CherryPy as a "normal" service, this problem doesn't occur.
My CherryPy-Python-Project has many stdout- and stderr-outputs, maybe it has something to do with that?
Note: Switching to Jython is not an option (because I need the c_types-library)
In addition to jwalker's comment about the STDOUT buffer - maybe try piping STDOUT and STDERROR to /dev/null, which in newer versions of bash would be:
I would also recommend taking a look at the your CherryPy sessions, if you have it enabled. Session locking may prevent the same client from being able to view another request. See here: http://blog.schmichael.com/2007/09/20/session-locking-and-performance-in-cherrypy/