Hi,
I am seeing a few problems performing PUTs against Apache 1.3 in a
production environment. This test code:
WebdavResource r = new WebdavResource("http://server/dir/");
r.setUserInfo(username, password);
r.putMethod("/dir/foo9.txt", "hello");
opens 3 connections. It does 2 PROPFINDS (one for ctor, and one for
setUSerInfo) and a PUT. It then keeps those 3 connections alive a la HTTP
1.1, but never reuses them. The Apache server closes them after a short
timeout and they sit in CLOSE_WAIT for a while. This is causing the server
to run too many processes, and the client to run out out of file
descriptors.
Debugging this, I found that the reason it is failing to reuse connections
seems to be WebdavResource.isTheClient(), which contains this line:
return clientHttpURL.getAuthority().equals(httpURL.getAuthority());
This check is failing, because
clientHttpURL.getAuthority() --> "server:80"
httpURL.getAuthority() = "server"
So changing my client code to this helps:
WebdavResource r = new WebdavResource("http://server:80/dir/");
But we'd really like to be able to turn off keep-alive behavior, or
manually close the connection when we're done, rather than waiting for
garbage-collection & OS timeouts - we have so many clients and servers,
and so much traffic that leaving the connections open is too expensive.
We'd also like to avoid the PROPFINDS, which don't seem essential.
I am testing a hack/patch to bypass the PROPFINDs and forcibly close the
connection after a PUT, but would prefer better solutions obviously!
Thanks for any insights you can offer,
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]