Delphi 10.3 + TROIndyHttpServer + Linux memory leak


We have constantly growing memory usage of our server application deployed on Linux (Ubuntu server). Each time a client is accessing the server, memory is growing and never drops, even if the client is closed.
The easiest way to reproduce is to open in a browser the server access link and close the tab (ex.
By monitoring the connections with lsof, you can see that TCP connection is created and dropped after closing client.
We have tried to test the SuperHTTP server, the result is the same.
In our client application we are using Grijjy HTTP channel.

The same project compiled for Win environment is working fine.
We tried the following topic, but the memory is not dropping:

Yet, it’s not clear where is the problem: at Delphi/Remobjects or other source.

Do you faced this issue before? Do you know any workaround?

Thank you and best regards


If the same project works as expected on Windows platform and has issues on Linux platform, it can be other [hidden] issues with native Delphi code similar to RSP-32426.

What class factory is used in your project? the default one?

nobody reported about this issue earlier

We are using Per-Request class factory


This is the default class factory for new services and it implements a minimal activation model by simply creating a new instance for each incoming request and destroying the instance after the request has completed.

so I think, memory leak isn’t here

I’ve created a simple console app with a test service, where you can reproduce the memory leak. After stating the server in linux access throw a browser port 53\bin, at the first access memory increases with multiple MB, after refreshing page increases with KB-s, if you keep refreshing the page, it’s increasing with 2 bytes. (3.3 MB)


this is default behavior for Delphi Memory Manager.

it can not be a Remoting SDK leak.

OK, but increasing with 2 bytes is just after the fifth refresh of the page, till then memory growing is much more bigger


Can you add {$UNDEF RO_RTTI_Support} to, rebuild project and retest, pls?

it will exclude Delphi RTTI stuff.

The result is the same, but instead of 2 bytes, it’s increasing with 4 bytes after 5 refreshes.


it is half of Pointer size …

can you check with FastMM5 what is exactly leaked, pls?

FastMM5 is working with linux?


You are right, it works only on Windows platforms.

Linux uses the Posix/32 memory manager