[tao-users] Clint iiop connections to server

Phil Mesnier mesnierp at ociweb.com
Sun Feb 21 17:32:45 CST 2016

Hi Graham,

The short answer is no,TAO currently does not have any sort of a time based active close policy for server side connections. There are connection cache purging strategies, which are triggered when the capacity of the cache is reached. The default strategy is Least Recently Used, which would cover your "dead" clients. The connection cache management is covered in OCI's TAO Developer's Guide and in other documentation. The default connection cache size is 1/2 of ACE's max handles value, which is typically 512, and the default purge percentage is 20%. 

It would be possible to add an active close policy which either hooked into the reactor or ran in a separate thread. The reason this isn't there now is that generally quiescent connections are not a problem until you have a lot of them, and there is a way to deal once that becomes the case. Also, time spent scanning the cache is time not spent servicing active clients. Finally, there is the issue of sending CloseConnection messages. TAO servers currently do not do that, so a client may not detect the connection close until it tries to send a new request at which time it receives a COMM_FAILURE exception. Even though your dead clients don't care, the ones that aren't dead ought to have the chance to cleanly reset the connection to the server.

Best regards,

> On Feb 21, 2016, at 11:30 AM, graham walsh <gjw369 at gmail.com> wrote:
> Hi,
> Form filled in below;
> TAO VERSION: 2.3.3 
> ACE VERSION: 6.3.3
> g++ on linux.
> I've a general question and its specific to the deployed architecture. I've filled out the form below as much as possible but I dont have all the details at hand, heres my question.
> I have a server that has a lot of things connected to it, over IIOP. Everything works fine until;
> 1) Certain (java) clients get themselves locked up. They stop reading from their TCP buffers and they are ultimately (brutally) killed off. The admins take care of that.
> 2) Until the admins intervene, the client connection to the server is maintaned as expected. The transport on server side does not close the connection down as it has no idea that the client is "dead".
> However, it would be nice if the server could have logic something like this;
> "If I have an idle connection from anything connected to me from machine X, I am going to shut down the connection after 30 seconds of inactivity".
> I'm not sure it TAO/ACE allows this, if it is possible, could somebody direct me to the appropriate API/DOC. The target architecture/application is bog standard  CORBA clients and servers. Nothing insanely complicated going on. The above situation arises from time to time and the cient(s) in question (specifically their connections to the server) are a source of concern and I would like to be able to manage things for this specific set of clients server side (as opposed to waiting for the admin guys to kill them off).
> Is there anything like "Close client connections after N ms inactivity" server side?
> thanks in advance.
> G
>     TAO VERSION: 2.3.3
>     ACE VERSION: 6.3.3
>        Linux red had
>     TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
>     g++ - not sure of version but its a supported one.
>     THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
>     specific file, simply state which one]:
>     dont have it here.
>     THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
>     use a link to a platform-specific file, simply state which one
>     (unless this isn't used in this case, e.g., with Microsoft Visual
>     C++)]:
>     dont have it here.
>     CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
>     (used by MPC when you generate your own makefiles):
>     Not a failure
>         EXECUTION?
>     connections at runtime.
>     how to deal with misbehaving clients holding connections.
>     See above
> _______________________________________________
> tao-users mailing list
> tao-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/tao-users

Phil Mesnier
Principal Engineer & Partner

tel  +1.314.579.0066 x225
ociweb.com <http://ociweb.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20160221/8ad793d1/attachment.html>

More information about the tao-users mailing list