#1 2025-03-19 11:19:19

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 564

RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode

I Start Service compiled for 64Bit in Debug Mode, it seems to hang, but in Log i can see that ComputeRoutes takes 99s to start.
Starting same Service from Command Line starts immediate as expected.

i saw thsi Problem before but not taking so long...


Rad Studio 12.3 Athens / 13.0 Ganymede

Offline

#2 2025-03-19 15:38:01

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,090
Website

Re: RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode

I see no reason why it should wait so long.
The process itself is linear, O(n) depending on the number of routes to compute.

The "99 seconds" value is the maximum which could be displayed in the logs.
It may even be more that 99 seconds (or Luftballons).

The only reason of a problem in debug mode may be because there is a contention with the TRestServer.fRouterSafe: TRWLightLock lock.
But only if TRestServer.Uri is called and the ComputeRoot is not finished.
Ensure you don't make any client request in the IDE before having finished the ComputeRoutes.

Normally, TRestHttpServer.Create calls ComputeRoutes so it should not appear such race condition.
Is your problem from within TRestHttpServer.Create ?

Offline

#3 2025-07-17 10:44:27

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 564

Re: RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode

After a long time i had to debug my m2 service with 64Bit again today.

and there is a delay of 55s at the moment. Starting Service in RS 12.3 64Bit Debugger

https://imgtr.ee/image/image.SE1M

Using the 32Bit exe with RS 12.3 Debugger it only takes 1s at the same function

Int the Picture there is a gap in the log at 12:14:12.528 -> 12.15.02.944 of 50s I don't know what the programm does at this point ???


Rad Studio 12.3 Athens / 13.0 Ganymede

Offline

#4 2025-07-17 14:03:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,090
Website

Re: RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode

And without the Delphi debugger?

Offline

#5 2025-07-17 17:23:18

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 564

Re: RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode

Without it runs as the 32Bit Version
Yes there must something the Debugger does what the exe dont like, but i dont know what

Last edited by itSDS (2025-07-17 17:24:35)


Rad Studio 12.3 Athens / 13.0 Ganymede

Offline

#6 2025-07-17 17:54:09

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,090
Website

Re: RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode

Sounds like a Delphi debugger bug - perhaps due to the threads creation.
Try to disable the debug thread naming, if you can.

Offline

#7 Yesterday 09:37:49

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 564

Re: RS12.3 64Bit ComputeRoutes takes 99s in DEBUG Mode

Hi Arnaud, via ChatGPT i found this and it seems to help:

In Registry:
HKEY_CURRENT_USER\Software\Embarcadero\BDS\22.0\Debugging

Add EnableWaitChainDetection as DWORD with value 0

it disables the Thread Wait Chain Feature from Delphi.


Rad Studio 12.3 Athens / 13.0 Ganymede

Offline

Board footer

Powered by FluxBB