From: <php...@li...> - 2010-06-26 12:29:29
|
Great, thanks for the quick response. I've updated my tomcat timeout and everything seems to be working well enough now. Thanks for the help, Brian On Sat, Jun 26, 2010 at 7:42 AM, < php...@li...> wrote: > Hi Brian, > > > sleep(30); > > the default tomcat keep-alive timeout is 20000ms. If your script > doesn't send any data within 20seconds, tomcat closes the connection. > > Please change tomcat's server.xml to > > <Connector port="8080" protocol="HTTP/1.1" > connectionTimeout="40000" > redirectPort="8443" /> > > (there's no separate keepAliveTimeout; Tomcat uses the > connectionTimeout for the keep-alive as well) > > The hanging at the end of the script is another problem. PHP/Java > Bridge 6.0 uses HTTP/1.1 chunked connections, which require a shutdown > sequence. From the current Java.inc: > > for ($this->res=$this->fread(10); strlen($this->res) < 10; > $this->res.=$this->fread(10-strlen($this->res))); > > The "10" is the <F t="E"/>, which is okay. But I should have checked > that the connection is still alive. Or simply replace the for loop > with fread($sock, 10), as tomcat won't send the 10 bytes > one-after-the-other. > > > Thank you very much for reporting this issue. > > > Regards, > Jost Bökemeier > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |