8
Views
1
Comments
RESTAPI - Connection closed by the server
Application Type
Traditional Web
Platform Version
10.0.1023.0

Hello,

I am consuming a RESTAPI inside a foreach, but on the 3-4 request i am getting the following error: 

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. 

My first thought was that the endpoint server was closing the connection as the error suggests, then i created a simple nodejs code that calls the same endpoint several times, and in none of them i got the same error.

I debugged the application, and while doing it, all calls worked as expected. It seems to have worked because there was a time interval between each call.

Any ideas on how to solve this or to do a 'wait' inside the server action?

Thanks.

mvp_badge
MVP
Rank: #71

Hi Rafael,

You can use Sleep component from the Forge to implement 'waits' before each REST call.

Regards,

Nordin