# OpenRPA.RDService Potential Handle Leak Causing RDP Disconnects?

**URL:** <https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320>\
**Category:** Issues and feature requests\
**Tags:** openrpa\
**Created:** [August 31, 2026, 12:02pm UTC](https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320 "2026-08-31T12:02:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sby](https://discourse.openiap.io/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@sby](https://discourse.openiap.io/u/sby)\
**Post date:** [August 31, 2026, 12:02pm UTC](https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320/1 "2026-08-31T12:02:44Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Allan\_Zimmermann](https://discourse.openiap.io/user_avatar/discourse.openiap.io/allan_zimmermann/32/12_2.png) [@Allan\_Zimmermann](https://discourse.openiap.io/u/Allan_Zimmermann)\
**Post date:** [August 31, 2026, 12:56pm UTC](https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320/2 "2026-08-31T12:56:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openiap.io/uploads/default/original/2X/a/a1ca7b164ac9a826839704d9ac82c7b5e6bcf557.png) [@system](https://discourse.openiap.io/u/system)\
**Post date:** [August 31, 2026, 1:42pm UTC](https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320/4 "2026-08-31T13:42:58Z")

</div>

Unlisted on August 31, 2026, 1:42pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://discourse.openiap.io/uploads/default/original/2X/a/a1ca7b164ac9a826839704d9ac82c7b5e6bcf557.png) [@system](https://discourse.openiap.io/u/system)\
**Post date:** [September 1, 2026, 7:25am UTC](https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320/5 "2026-09-01T07:25:56Z")

</div>

Listed on September 1, 2026, 7:25am UTC



---

<div class="post-metadata">

**Author:** ![mlh1](https://discourse.openiap.io/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mlh1](https://discourse.openiap.io/u/mlh1)\
**Post date:** [September 1, 2026, 7:38am UTC](https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320/6 "2026-09-01T07:38:37Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Allan\_Zimmermann](https://discourse.openiap.io/user_avatar/discourse.openiap.io/allan_zimmermann/32/12_2.png) [@Allan\_Zimmermann](https://discourse.openiap.io/u/Allan_Zimmermann)\
**Post date:** [September 1, 2026, 8:05am UTC](https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320/7 "2026-09-01T08:05:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mlh1](https://discourse.openiap.io/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mlh1](https://discourse.openiap.io/u/mlh1)\
**Post date:** [September 1, 2026, 9:42am UTC](https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320/8 "2026-09-01T09:42:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openiap.io/uploads/default/original/2X/a/a1ca7b164ac9a826839704d9ac82c7b5e6bcf557.png) [@system](https://discourse.openiap.io/u/system)\
**Post date:** [September 8, 2026, 9:43am UTC](https://discourse.openiap.io/t/openrpa-rdservice-potential-handle-leak-causing-rdp-disconnects/3320/9 "2026-09-08T09:43:07Z")

</div>

Closed on September 8, 2026, 9:43am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
