OpenRPA.RDService Potential Handle Leak Causing RDP Disconnects?

We’re troubleshooting an issue where individual robot RDP sessions suddenly disconnect while OpenRPA itself keeps running.

When this happens, the RDP client logs 0x800705AA (ERROR_NO_SYSTEM_RESOURCES), followed by RDP graphics errors and the session eventually going into a Disc state.

While investigating the resource exhaustion error, we noticed that OpenRPA.RDService appears to continuously accumulate handles over time:

  • After three days: 16,711,680 handles

  • After restarting the service: dropped to ~6,000 handles

  • Then started increasing again immediately

  • With all 5 HD robots enabled: ~93 handles/sec

  • With all 5 HD robots disabled: almost no handle growth

There are also 4 regular user sessions on the same server.

The growth also seems independent of workload - a mostly idle robot shows roughly the same handle growth as a busy one.

Using Sysinternals Handle, most of the 16.7M handles were:

  • Process: 12,311,277

  • Token: 4,396,938

The process handles mainly point to explorer.exe, nonexistent process and OpenRPA.exe. The token handles mainly point to NT AUTHORITY\SYSTEM:3e7. Interestingly, the process handles point to processes owned by both robot users and regular users, even though the rapid handle growth almost stops when the HD robots are disabled.

Does the continuous handle growth in RDService look abnormal/problematic? And do you think it could be related to the RDP disconnects and ERROR_NO_SYSTEM_RESOURCES errors we are seeing?

Thanks in advance :slight_smile:

Hey. I’m a little rusty on HD robots. It’s been a long time since I last worked with HD robots, but based on what you’re describing, there is no doubt it’s an issue with the rdservice. My best guess is something is going wrong in the loop that checks if OpenRPA is running.

Is logging enabled? I’m 95% sure rdservice, by default, has logging enabled and creates a file called log_rdservice.log or log_rdservice.txt or something like that inside the Program Files\OpenRPA folder (if that is where you installed OpenRPA). If not, you can enable it inside the settings.json file in the same folder. Stop the server, edit the file, then start it again, and look for the file.

Hi Allan,

The rdservice logs does not contain much. We restarted the service and turned off all the robots, so it makes sense it says 0 sessions.
We then enabled the hd robots, which we can see in the log.
This is the log we see for the time period we are interested in (and nothing as of 15.29 has happened since the entry from 11:28):
[11:19:46.105][Information] GetOwnerExplorer
[11:19:46.115][Information] WTSLogoffSession 6
[11:19:46.813][Information] cleanup::Removing session for arcticgroup\rpaa1
[11:19:46.813][Information] Currently have 0 sessions
[11:20:55.254][Information] onWatchEvent
[11:20:55.254][Information] operationType: replace
[11:20:55.255][Information] Adding session for arcticgroup\rpa5
[11:28:22.811][Information] onWatchEvent
[11:28:22.812][Information] operationType: replace
[11:28:22.813][Information] Adding session for arcticgroup\rpa2
[11:28:23.736][Information] onWatchEvent
[11:28:23.737][Information] operationType: replace
[11:28:23.738][Information] Adding session for arcticgroup\rpaa1
[11:28:24.310][Information] onWatchEvent
[11:28:24.311][Information] operationType: replace
[11:28:24.312][Information] Adding session for arcticgroup\rpa4
[11:28:25.120][Information] onWatchEvent
[11:28:25.120][Information] operationType: replace
[11:28:25.121][Information] Adding session for arcticgroup\rpa3

Also the settings.json file you mention, has log_activity set to False.

But as i understand it the settings.json in the C://ProgramFiles/OpenRPA is the default/template settings.json where each robot/user has their own version of it.
And enabling logging for each user, logs the activity of OpenRPA, not RDservice.
Or am i misunderstanding something?

Also, are you saying RDService has a loop that checks if OpenRPA is running?
We can see that in the settings.json, in properties, there is a rdservice_reloadinterval set to 1 second.
Does that mean that it checks every second, which may cause the issue?
Or do you have any idea what cause the issue and is there some extra checks we can do?

Thanks in advance :slight_smile:

Do those “onWatchEvent” repeat, or do they only show right after users are enabled? Is there any other info showing after a while?

You can change the log level in C://ProgramFiles/OpenRPA/settings.json by changing log_file_level_maximum to 6 (I think 6 was the max, but I’m not sure). As always, make sure you stop the service, then change the file, and then restart the service.

No, the OnWatchEvent appear just once for each robot in that timeframe

Those logs are around 11.20-11.30. The next log entry we see is at 16.18, but this is where we disconnect and connect to the remote server immidiately after. I am not sure if that is relevant to this particular issue, but looking through the log (which unfortunately only show time and not date), i can see that we disconnect and reconnect a lot of times.
Do you want me to share the log file - or at least parts of it?

Also regarding the settings.json, it has logging set to False and we have not changed that file since 12th of May 2026, but we can still see logs for the RDService so I am not sure how the RDService log and the json file are connected.

We do have logging set to true for our users in our C:\Users\\Documents\OpenRPA settings.json, meaning we get a logfile.txt (a log for OpenRPA) for each user