Error Message "Job stopped with an unexpected exit code: 0x40010004" and "Could not start executor. Creating user session timed out."

Scenario :

VM OS : Microsoft Windows Server 2022 Standard
VM Model : VMware7.1
Type of Robot : Unattended
Type of installation : Service Mode installation
Login to Console : False
Reason : Need specific screen resolutions for CV automation.
Type of Robot connection : RDP connection with VM

Exceptions Faced:

Error : Could not start executor. Creating user session timed out. System.Exception: Could not start executor. Creating user session timed out.

Error : Job stopped with an unexpected exit code: 0x40010004 System.Exception: Job stopped with an unexpected exit code: 0x40010004.

Investigation We have done till date :

  1. User Logoff: There is no evidence of any user-initiated logoff activity.

  2. System Shutdown: Checked for system restart or shutdown events that might have occurred while the job was running. There were no records of such events in the system logs.

  3. Specific Time Duration: To address the possibility of a time-based issue, we considered whether the system might kill the UiPath Executor after a specific time period. However, we have previously run the robot for close to 100 hours without encountering any issues.

  4. UiPath Code Level Exception: There were no error type exceptions thrown in UiPath when this error occurred. The UiPath process was running as expected, and the fault occurred suddenly, with no preceding series of exceptions in the UiPath logs.

  5. Sudden Memory Usage Spike: Checked for any sudden memory usage spikes but found no relevant entries in the Windows System logs.

  6. Application Service Deadlock: Typically, heavy Excel or database operations can result in an application service deadlock, leading to the termination of the UiPath service and a restart. However, the workflow in question primarily utilized UiPath’s Computer Vision, with no extensive use of Excel or database activities.

  7. Event Viewer Investigation:
    The first job was faulted at 11:58:42 AM on 2 Oct 2023, with an associated Error event in Event Viewer (Source: UiPath, Event ID: 0, Level Error: Job stopped with an unexpected exit code: 0x40010004). Immediately after this error, an information log indicated that the “UiPath.Executor.exe” application was terminated due to being unresponsive (Source: Winsrv, Event ID: 1002). Notably, there were no warnings of memory spikes or CPU utilization near the timestamps of these two events in the Event Viewer.

The second job was faulted at 12:51:30 AM on 9 Oct 2023. In this case, we saw there was a connection to RDP at 12:50:35 AM (Source: Desktop Window Manager, Event ID: 9027) that happened, then the application was terminated due to being unresponsive (Source: Winsrv, Event ID: 1002). This time, upon termination, the UiPath Service captured a screenshot of the machine being stuck on a loading screen “Please wait for the Group Policy Client”.

Current Investigation:
With that, we have also checked and note that the RDP session seems to be disconnecting and reconnecting every 10 minutes due to an Idle Session timeout set in the server. After the robot is disconnected for idling, it reconnects successfully to the same Windows session and continues the execution. We are currently working with the client’s IT team to check why the VM may be stuck on the Group Policy Client screen.

Requesting Community’s Help in:
Require further insights into this error if someone has encountered it previously. If you have experienced this issue, please assist us by suggesting potential solutions or any available resolutions.

Additional Screenshots for the reference:


Have you checked this?

Hi @atomic,

I saw this thread earlier, from this thread Scenario 1 is not relevant to my case as I mentioned in my investigation.

Scenario 2 as well because issue is not consistent too as we have investigated both of these scenario’s.

Thanks for the reference.

@Shawn @RSSG
Adding my colleague in the loop.

Hi @Anil_G can you look into this, if any help

1 Like

Hello @nisargkadam23

Greetings for the day.

First a fall great details which helped to understand the exact issue. One of my contact recently faced similar issue around Feb 2023 on windows 2019 Server Machine.

They resolved this by switching off the idle time-out at server level.

Following are the reference steps for the same -

  • Open group policy editor ( start->run->gpedit.msc)

  • Navigate to local computer policy->Computer configuration->Administrative Templates → Windows components-> Remote desktop services-> Remote desktop session host → session time limits

  • Right click on set time limit for active but idle remote desktop service sessions

  • Click edit → select “Not Configured”.

  • Click apply and ok.

  • Reboot machine after changing group policy.

Hope this will help you.

Thanks and Regards,


  1. Is the a cal license that is enabled
  2. And as mentioned by @ruchirmahajan those are few cause of the error
  3. Are there any upgrades that were happeninng?
  4. Does it happen frequently or any pattern for occurances?


@nisargkadam23 we are encountering the exact same issues. On Windows Server 2022, using robots 2023.4.x. It appears we’ve been having this for a while intermittently but it’s recently increased in occurrence.

Did you get this resolved?

One thing we’re attempting to do right now is increase the UiPath_SESSION_TIMEOUT environment variable:

Hi @sam.fairbanks,

Can you confirm what is the exact time we are setting to increase the UiPath_SESSION_TIMEOUT environment variable?

and did it work for you? could you confirm if you have any official answer from UiPah?

Thanks a lot!

@nisargkadam23 We ended up setting it to 180 (seconds). It seems to have taken effect and helped, although we’ve still had a couple of failures. Note that, despite the documentation saying that on the UiPath Robots service needs to be restarted, we needed to fully restart our Windows Server. We’re still in a wait-and-see approach to see if the number of failures due to this goes down.