atom feed7 messages in net.sourceforge.lists.exist-openRe: [Exist-open] EXPath HTTPClient no...
FromSent OnAttachments
Peter StadlerSep 11, 2013 11:20 am 
Joe WicentowskiSep 11, 2013 11:53 am 
Peter StadlerSep 11, 2013 12:04 pm 
Misztur, ChrisSep 11, 2013 12:11 pm 
Peter StadlerSep 11, 2013 12:42 pm 
Adam RetterSep 11, 2013 12:54 pm 
Misztur, ChrisSep 12, 2013 3:32 am 
Subject:Re: [Exist-open] EXPath HTTPClient not closing connections
From:Peter Stadler (stad@weber-gesamtausgabe.de)
Date:Sep 11, 2013 12:42:07 pm
List:net.sourceforge.lists.exist-open

Chris, many thanks!

I added <http:header name="Connection" value="close"/> to my request object and
that seems to do the trick!

It's really been a show stopper so many thanks again! All the best Peter

Am 11.09.2013 um 21:11 schrieb "Misztur, Chris" <CMis@macleanfogg.com>:

Look at 14.10

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

On Sep 11, 2013, at 2:06 PM, "Peter Stadler" <stad@weber-gesamtausgabe.de>
wrote:

Yes, sorry, I should put that into my signature ;-)

eXist 2.1, mac and debian

Best Peter

Am 11.09.2013 um 20:53 schrieb Joe Wicentowski <joe@gmail.com>:

Hi Peter,

This is beyond my ability to troubleshoot, but your answer to the usual questions will probably help others speak to your question:

Which version of eXist and which OS are you using?

On Wed, Sep 11, 2013 at 2:20 PM, Peter Stadler <stad@weber-gesamtausgabe.de> wrote:

Dear all,

I recently switched from the native HTTPClient
"http://exist-db.org/xquery/httpclient" to the EXPath HTTPClient
"http://expath.org/ns/http-client" because it allows for setting a socket
timeout. Regrettably, this switch brought in another problem since my app was
creating a lot of tcp connections ending in CLOSE_WAIT, which brought my app
down due to running out of file handles. The problem only occurs when the call to http:send-request() is made from an
XQuery module [1] but not when issued directly from eXide (e.g.)

Is there any workaround or am I doing wrong? Many thanks Peter

[1] A simple wrapper function:

declare function myhttp:http-get($url as xs:anyURI) { let $req := <http:request href="{$url}" method="get" timeout="4"/> return http:send-request($req) };

------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk