It is slow to display new threads while debugging.


I did the following:

1. Create a screen with one button in Service Studio (click the button to execute the screen action)

2. Open the screen created in step 1 in a browser (open in two windows)

3. Set a breakpoint on the first element (Start) of the button's screen action

4. Start the debugger

5. Click the button in the first window opened in step 2.

6. Click the button in the second window

7. Wait about 2 minutes

8. Two threads appear in the debugger "Threads" tab


What I expect is that they appear in "Threads" immediately after clicking the button in step 6.


Question:

- Why can't I see it without waiting for about 2 minutes?

- Can this 2 minute wait time be changed from any setting?


I saw the following document, but this question was not resolved.

[Threads-OutSystems

[Debugging Applications-OutSystems


environment:

Platform Version 11.0.212.0

Solution

Hi Hiroyuki.

What you're observing is a session lock, which is explained here (search for "Session access and request lifecycle"). Basically OutSystems prevents concurrent requests from the same user. This simplifies the programming model, and reduces the risk of data corruption.


But why does a second thread appear after 2 minutes?

After the first request times out, the session lock is released, and the second thread may start. Note that you should not rely on the first request completing by this stage - it will likely get aborted by IIS as soon as you continue on the debugger.


The default timeout is 110 seconds, and is configured in IIS. Check the documentation for executionTimeout here: https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/e1f13641(v=vs.100)

The request timeout can also be extended dynamically by invoking SetRequestTimeout from HTTPRequestHandler extension. see: https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/HTTPRequestHandler_API#SetRequestTimeout. However, as far as I can remember, this will not prevent the session lock from being released after the default timeout.

Solution

Hi leonardo

Excellent! ! Your answer is perfect!
thank you very much:)

I did not think that I could get an answer as fast as this. I was moved by the wonderful community.