# Is there a known memory/thread/handle leak in RO v10.0.0.1611

**URL:** https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900
**Category:** Data Abstract
**Tags:** net
**Created:** [September 1, 2026, 1:05pm UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900 "2026-09-01T13:05:34Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [September 1, 2026, 1:05pm UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/1 "2026-09-01T13:05:34Z")

</div>

On production systems we see resource leaks in one of our .NET RO servers

While running for days we see thread & handle count going up

We also see memory (private bytes & WS) going up.

When analysing with process explorer it is my belief that the threads that sporadically are kept alive are the threads created by RO.

The RO functions however have completely finished

Below some screenshots, the callstacks from process explorer are not correct but I believe they are in effect the RO threads.

Note: On my development and test machines I cannot reproduce the issue.

In production we see however the hanging threads started during business hours from monday till friday.

Screenshot with callstack info from process explorer & VS debugger at same time

 ![image](https://talk.remobjects.com/uploads/default/original/3X/2/3/23a4d65164385b177afe743c9cec16bb8b948345.png)

Thread info of a process in production with already 100 extra threads

 ![image](https://talk.remobjects.com/uploads/default/original/3X/5/3/53ce12e4b60dcde4395f166f20d280265575ced9.jpeg)

Our code can show which RO service functions are still busy.

From this info I believe that it is not our business logic functions that are still working

 ![image](https://talk.remobjects.com/uploads/default/original/3X/2/9/29a835f27fe5305e21a0d5a0253c04e709e604f0.png)

Note: It might be that the issue is a bug outside RO/DA, we are still investigating, but I already wanted to query if there are known issues.

Also if a stable new RO/DA version is released (ideally both .NET & delphi versions) then I can test if the latest version solves this issue. Please keep me informed.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [September 1, 2026, 6:50pm UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/3 "2026-09-01T18:50:52Z")

</div>

Known, no. We’ll invstigate.

---

<div class="post-metadata">

### Author: ![artem.vuitsyk](https://talk.remobjects.com/user_avatar/talk.remobjects.com/artem.vuitsyk/32/22795_2.png) [@artem.vuitsyk](https://talk.remobjects.com/u/artem.vuitsyk)
#### Post date: [September 2, 2026, 8:54am UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/4 "2026-09-02T08:54:06Z")

</div>

Hi Frederic,  
It turns out to be the server side of the problem you reported earlier, which we already fixed, and the fix is in the build we sent you.)

> [@How to prevent rare cases where RO HTTPS call hangs](https://talk.remobjects.com/t/how-to-prevent-rare-cases-where-ro-https-call-hangs/33836):
>
> On rare occasions we have a RO client (that uses a HTTPS connection) hangs in a call. It gets stuck in Receive functions. See screenshot. Is there a way to prevent this (apart from killing the thread and respawning it)? What is your suggested approach?

the workaround is the same as the client-side one in the other thread

```auto
using System.Net.Sockets;
using RemObjects.SDK;

public class TimeoutAwareSslServerFactory : IConnectionFactory
{
    private readonly SslConnectionFactory fSslOptions;
    private readonly int fHandshakeTimeout;

    public TimeoutAwareSslServerFactory(SslConnectionFactory sslOptions, int handshakeTimeout)
    {
        this.fSslOptions = sslOptions;
        this.fHandshakeTimeout = handshakeTimeout;
    }

    public Connection CreateServerConnection(Socket socket)
    {
        this.fSslOptions.LoadCertificate();

        var inner = new InnerConnection(socket);
        inner.TimeoutEnabled = true;
        inner.Timeout = this.fHandshakeTimeout;

        return new SslConnection(this.fSslOptions, inner);
    }

    public Connection CreateClientConnection(Binding binding)
    {
        return this.fSslOptions.CreateClientConnection(binding);
    }

    // SslConnection reads whatever has already arrived. A plain Connection would
    // block for a full buffer here and stall healthy handshakes.
    private class InnerConnection : Connection
    {
        public InnerConnection(Socket socket) : base(socket) { }

        public override int Read(byte[] buffer, int offset, int size)
        {
            return this.ReceiveWhatsAvailable(buffer, offset, size);
        }
    }
}

```

Set it on the channel after `SslOptions` is configured, before the server is opened:

```auto
var channel = (IpTcpServerChannel)server.NetworkServer.ServerChannel;

channel.TcpServer.ConnectionFactory =
    new TimeoutAwareSslServerFactory(channel.SslOptions, channel.TcpServer.Timeout);

```

This only applies with TLS enabled on that channel. If `SslOptions.Enabled` is off there, let us know then the threads are following connections that stay open, and we should look at that instead.

---

<div class="post-metadata">

### Author: ![artem.vuitsyk](https://talk.remobjects.com/user_avatar/talk.remobjects.com/artem.vuitsyk/32/22795_2.png) [@artem.vuitsyk](https://talk.remobjects.com/u/artem.vuitsyk)
#### Post date: [September 2, 2026, 9:23am UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/5 "2026-09-02T09:23:45Z")

</div>

fix for this issue is present in .1628 which we uploaded into your personal cabinet.  
can you retest this issue with that build, pls?

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [September 2, 2026, 9:32am UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/6 "2026-09-02T09:32:58Z")

</div>

Thanks, I will try the build you sent me (i was a bit hesitant up until now because we have an entire toolchain using RO and deadlines coming up so switching is delicate)

Please note that the memory/thread/handle issue is on a .NET FW 4.7.2 RO server inside the LAN of our customers and this RO server only listens to a plain TCP channel. There is no SSL involved.

![image](https://talk.remobjects.com/uploads/default/optimized/3X/2/a/2ae922dc1a45ae3ef51dc19b2e02b537ac8f2d2e_2_690x37.png)

Regards,

Frederic

---

<div class="post-metadata">

### Author: ![artem.vuitsyk](https://talk.remobjects.com/user_avatar/talk.remobjects.com/artem.vuitsyk/32/22795_2.png) [@artem.vuitsyk](https://talk.remobjects.com/u/artem.vuitsyk)
#### Post date: [September 2, 2026, 10:03am UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/7 "2026-09-02T10:03:42Z")

</div>

> [@artem.vuitsyk](#):
>
> This only applies with TLS enabled on that channel. If `SslOptions.Enabled` is off there, let us know then the threads are following connections that stay open, and we should look at that instead.

> [@fvancrae](#):
>
> Please note that the memory/thread/handle issue is on a .NET FW 4.7.2 RO server inside the LAN of our customers and this RO server only listens to a plain TCP channel. There is no SSL involved.

> that is exactly what I meant by “if `SslOptions.Enabled` is off there, let us know”…

With a plain TCP channel that fix does not apply, so that build will not change this, unfortunately.

Could you tell me what `Server.Timeout` and `Server.TimeoutEnabled` are set to on that channel? And if you can catch the process while the thread count is high, a Parallel Stacks view (or a dump) would show where those threads are actually standing.

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [September 2, 2026, 10:36am UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/8 "2026-09-02T10:36:00Z")

</div>

Hi,

TimeoutEnabled & 300

Note: I posted a callstack (with dubious info) from sysinternals process explorer in a previous post.

On our development machines we cannot reproduce the issue.

This might be an issue totally unrelated to RO/DA, the server uses a library (from the belgian government) of questionable quality.

Maybe a simple question which already helps pinpointing the issue: We use pooled services & no or very few extra services need to be created. Does RO/DA itself create extra threads in that case?

It looks to be the case, see the log at the bottom. This surprises me a bit. Service instances are pooled for performance reasons but there is no thread pool (for the same reason)?

 ![image](https://talk.remobjects.com/uploads/default/original/3X/e/1/e18dd2ffc7d6a1d55168467fe3994da7aec460b5.png)

2026-09-02 12:26:39.2784|DEBUG|EHealthProxy.HelperClasses.ConnectorHelper|About to call PrepareService for EHealthProxy RO service function GFDGetStatus service worker object 29 OSThrID 17444 ManagedThrId 451  
2026-09-02 12:27:26.6511|DEBUG|EHealthProxy.HelperClasses.ConnectorHelper|About to call PrepareService for EHealthProxy RO service function RecipeListReservations service worker object 29 OSThrID 28736 ManagedThrId 599  
2026-09-02 12:27:33.0415|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recip-e found 0 reservations (page:0) after 1/01/0001 0:00:00  
2026-09-02 12:27:33.0415|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recipe ListReservations for startdate 1/01/0001 0:00:00 returned code:100 message::? prescrstatus:  
2026-09-02 12:27:58.2506|DEBUG|EHealthProxy.HelperClasses.ConnectorHelper|About to call PrepareService for EHealthProxy RO service function RecipeListReservations service worker object 29 OSThrID 692 ManagedThrId 546  
2026-09-02 12:28:04.3164|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recip-e found 0 reservations (page:0) after 30/12/1899 0:00:00  
2026-09-02 12:28:04.3164|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recipe ListReservations for startdate 30/12/1899 0:00:00 returned code:100 message::? prescrstatus:  
2026-09-02 12:28:33.0745|DEBUG|EHealthProxy.HelperClasses.ConnectorHelper|About to call PrepareService for EHealthProxy RO service function RecipeListReservations service worker object 29 OSThrID 25168 ManagedThrId 737  
2026-09-02 12:28:39.2609|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recip-e found 0 reservations (page:0) after 1/01/0001 0:00:00  
2026-09-02 12:28:39.2609|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recipe ListReservations for startdate 1/01/0001 0:00:00 returned code:100 message::? prescrstatus:  
2026-09-02 12:29:39.2830|DEBUG|EHealthProxy.HelperClasses.ConnectorHelper|About to call PrepareService for EHealthProxy RO service function RecipeListReservations service worker object 29 OSThrID 6692 ManagedThrId 679  
2026-09-02 12:29:45.1892|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recip-e found 0 reservations (page:0) after 1/01/0001 0:00:00  
2026-09-02 12:29:45.1892|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recipe ListReservations for startdate 1/01/0001 0:00:00 returned code:100 message::? prescrstatus:  
2026-09-02 12:30:45.1955|DEBUG|EHealthProxy.HelperClasses.ConnectorHelper|About to call PrepareService for EHealthProxy RO service function RecipeListReservations service worker object 29 OSThrID 5648 ManagedThrId 682  
2026-09-02 12:30:52.1122|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recip-e found 0 reservations (page:0) after 1/01/0001 0:00:00  
2026-09-02 12:30:52.1122|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recipe ListReservations for startdate 1/01/0001 0:00:00 returned code:100 message::? prescrstatus:  
2026-09-02 12:31:06.2818|DEBUG|EHealthProxy.HelperClasses.ConnectorHelper|About to call PrepareService for EHealthProxy RO service function RecipeListReservations service worker object 29 OSThrID 24004 ManagedThrId 435  
2026-09-02 12:31:12.6262|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recip-e found 0 reservations (page:0) after 30/12/1899 0:00:00  
2026-09-02 12:31:12.6262|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recipe ListReservations for startdate 30/12/1899 0:00:00 returned code:100 message::? prescrstatus:  
2026-09-02 12:31:52.1133|DEBUG|EHealthProxy.HelperClasses.ConnectorHelper|About to call PrepareService for EHealthProxy RO service function RecipeListReservations service worker object 29 OSThrID 26532 ManagedThrId 595  
2026-09-02 12:31:58.0180|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recip-e found 0 reservations (page:0) after 1/01/0001 0:00:00  
2026-09-02 12:31:58.0180|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recipe ListReservations for startdate 1/01/0001 0:00:00 returned code:100 message::? prescrstatus:  
2026-09-02 12:32:58.0231|DEBUG|EHealthProxy.HelperClasses.ConnectorHelper|About to call PrepareService for EHealthProxy RO service function RecipeListReservations service worker object 29 OSThrID 29384 ManagedThrId 548  
2026-09-02 12:33:05.9758|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recip-e found 0 reservations (page:0) after 1/01/0001 0:00:00  
2026-09-02 12:33:05.9758|INFO|EHealthProxy.HelperClasses.ConnectorHelper|Recipe ListReservations for startdate 1/01/0001 0:00:00 returned code:100 message::? prescrstatus:

---

<div class="post-metadata">

### Author: ![artem.vuitsyk](https://talk.remobjects.com/user_avatar/talk.remobjects.com/artem.vuitsyk/32/22795_2.png) [@artem.vuitsyk](https://talk.remobjects.com/u/artem.vuitsyk)
#### Post date: [September 2, 2026, 11:00am UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/9 "2026-09-02T11:00:35Z")

</div>

> [@fvancrae](#):
>
> TimeoutEnabled & 300

Ok thanks, this eliminates the possibility that the timeout is disabled.

> [@fvancrae](#):
>
> Does RO/DA itself create extra threads in that case?

Yes. There is no thread pool on the plain TCP channel. One OS thread per TCP connection, alive for as long as that connection is.

> [@fvancrae](#):
>
> It looks to be the case, see the log at the bottom. This surprises me a bit. Service instances are pooled for performance reasons but there is no thread pool (for the same reason)?

Yes, and the two are unrelated: instance pooling is the class factory, threading is per connection.

---

<div class="post-metadata">

### Author: ![artem.vuitsyk](https://talk.remobjects.com/user_avatar/talk.remobjects.com/artem.vuitsyk/32/22795_2.png) [@artem.vuitsyk](https://talk.remobjects.com/u/artem.vuitsyk)
#### Post date: [September 2, 2026, 11:16am UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/10 "2026-09-02T11:16:17Z")

</div>

> object 29 OSThrID 28736 ManagedThrId 599  
> object 29 OSThrID 692 ManagedThrId 546  
> object 29 OSThrID 25168 ManagedThrId 737

In your log the pooled instance stays the same while the thread changes on every call, so every call arrives on a new connection. Your thread count is really your open connection count.

After the 300s timeout, inactive connections are closed, so the accumulated connections aren’t inactive - either something is still flowing through them, or the call hasn’t completed yet

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [September 2, 2026, 11:39am UTC](https://talk.remobjects.com/t/is-there-a-known-memory-thread-handle-leak-in-ro-v10-0-0-1611/33900/11 "2026-09-02T11:39:30Z")

</div>

\>Your thread count is really your open connection count.

This is very useful information. Below a thread count of 142 on a customers machine and the TCP info of that same proces.

Our server is listening on port 8988 so there are no “clients” that have left connections open.

The other connections are towards the internet.

To rule out RO/DA code we would need to know if the threads that got started at some point (e.g. in the second screenshot on 18,19 & 20 august) were created by RO/DA.

I initially suspected RO/DA because I log the RO/DA thread IDs and I found them in my logs but now I am reconsidering because the timing is off. e.g TID 17228 was created on 17/8/26 12:21 by RO/DA but the thread that hangs was created later 19/8/26 11:28 (but also happens to have TID 17228)

So you needn’t investigate this any further. The issue is probably in another 3rd party library.

Sorry for the load & thanks for the help.

Process in production with slowly increasing thread count + open network connections

 ![image](https://talk.remobjects.com/uploads/default/original/3X/4/c/4c01692b993ff32ab7529d3a791ae25218d85d2e.png)

Process explorer: active thread start times

 ![image](https://talk.remobjects.com/uploads/default/original/3X/0/5/05944fa6f6ae05896989608543b03fdf6ccac254.png)

Our logs:

 ![image](https://talk.remobjects.com/uploads/default/original/3X/2/e/2edb0f8e52e344bdf1b3d51ea8d38b9cb57d6089.jpeg)
