directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: need socket auto-close
Date Sun, 06 Jan 2008 03:15:37 GMT
Mark Swanson wrote:
> Emmanuel Lecharny wrote:
>> Mark Swanson wrote:
>>> Hello,
>>>
>>> I'm starting to worry about performance problems and memory issues 
>>> related to large numbers of open socket connections to ApacheDS.
>>> Is there something that can be done now (1.0) to close inactive 
>>> sockets after a period of time?
>>> Or, perhaps just LRU close sockets?
>>>
>>> If not, what place in the code would you recommend I look? Maybe 
>>> this is completely encapsulated in mina?
>>>
>>> Cheers.
>>>
>>>
>> Hi,
>>
>> I think this is something you should configure on your system. 
>> Inactive sockets are closed after some time_wait interval, which 
>> should be configurable on linux (|tcp_time_wait_interval value)| or 
>> windows (TcpTimedWaitDelay registry value)
>>
>> Any other ideas, guys ?
>>
> Thank you for your response!
>
> However, I was slightly unclear. Sorry. The connections are in the 
> ESTABLISHED state. I called them inactive because since there were so 
> many of them I just assumed clients were pre-connecting and waiting 
> (in what I called an inactive state) for some time before sending the 
> real request.
>
> Now that I think about it, clients shouldn't be doing that as that 
> would be pretty rude :-) So I think I need to add some JMX monitoring 
> code and figure out what my traffic patterns / connection rates are 
> before I bother anyone about this. Sorry for the noise.
>
> Cheers.
yep, you are right : as this is a connected protocol, as soon as a 
client is bound to the server, you will have to wait until the socket 
dies by itself ( around 30 minutes as a default configuration on linux 
box), or the client do a unbind.

If the client is not a piece of code you can manage, then you have a 
problem. In this case, the only rational solution is to use a proxy in 
front of ADS, to decouple the server from the client, and to avoid some 
DOS ...


>
>
>


-- 
--
cordialement, regards,
Emmanuel L├ęcharny
www.iktek.com
directory.apache.org



Mime
View raw message