Hi.
I’ve used RO for a number of years, but recently started to look more deeply into a resource issue encountered within a couple of our services; the bulk of the problem being poorly behaved printer drivers.
However, as a consequence I have been monitoring the number of Handles that windows services (using RO) hold over time, and I notice a growth in this even in relatively simple services with no real ‘outside’ contact, other than accesses to the Registry (to read info), Event subsystem (to write event log entries) and a remote SQL Server.
Typically I’m using C#, RemObjects SDK for .NET
In the system under scrutiny (deployed last year) I am using guild V8.3.91.1167.
This problem is not ‘massive’ but is somewhat alarming…
Memory usage is ‘good’, in a simple application delivering responses over HTTP I see 7,000+ handles on a minimally used
The handles seem to be type ‘Thread’. In this service application we are not creating any threads (ourselves) but are purely relying upon the RO framework to handle the pool of threads:
[RemObjects.SDK.Server.ClassFactories.PooledClassFactory( 16, PoolBehavior.Wait, false)]
I do also notice more than the expected number of handles into the system event log, even though its only the documented method of writing events which is being done.
However, I noticed that one of the services, otherwise quite similar in approach and technology (same RO, etc) was not exhibiting this issue, and found that intriguing. In both we have a management thread (created outside the RemObjects aspect of the application). It’s a ‘worker’ thread for our service to do some other occasional activities every few minutes (otherwise it is mainly in 100ms interval sleep state), and in there it was decided to make a call to GC.Collect().
So I added this GC.Collect() to the service which was showing ‘leakage’ (which also had an additional ‘CMC’ thread, in the same way. Hey presto… the Handle ‘leak’ no longer happens…!!!
But in my more ‘simple’ application which has no manually created ‘CMC’ thread, I do not have a ready place to add in the call to GC. Yes, of course I can create a thread to do this but I wondered if there was actually some leak in the way the .NET RO despatcher handles things…
We are not using any ‘STATIC’ stuff within the Implementation and AFAIK the implementation is quite ‘clean’ in terms of properly disposing of any objects it creates…
Are you aware of any areas in which RO may leak handles in the way described?
I intended to attach a small screenshot showing something slightly weird… but I cant seem to do that on this portal. I can send a .jpg if you can provide the method.
Thanks,
Clive