5.0.12 Endpoint Timeout

Product: PowerShell Universal
Version: 5.0.12

This one seems like a pretty clear expectation vs. reality issue, but I’m posting here prior to creating an issue to make sure I’m not missing anything in my configuration.

We have an endpoint that will potentially process a lot of data from a single file upload (2000 records with 60 datapoints). We have verification running to minimize execution time on records that already exist, but the sheer amount of data causes the endpoint to timeout after 100 seconds on initial runs after getting through about 1600 of the records. The documentation says that endpoint timeouts should be unlimited unless specified, however I receive the following error code:

Invoke-WebRequest: Status(StatusCode="Cancelled", Detail="", DebugException="System.OperationCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.")

I also tried manually setting the -Timeout to 300 seconds to see if it was just the default setting causing an issue, but I received the same error after the same amount of time.

There’s a couple of options here - is there an environment variable I need to set in my terminal to allow for longer IWR timelines, or something that needs to be set in the appsettings.json on the server? Alternatively, the timeout is not working as expected and I can create an issue.
Thanks!
:wavy_dash:ZG

Are you calling Invoke-WebRequest in PSU or is this outside PSU?

Outside PSU - from VSCode specifically

Well I found the log entry corroborating so it appears to be on the server side. I’ll convert this to an issue.

1 Like

Created issue #3946.

1 Like