Skip to content

Conversation

@mike-eh2
Copy link

My team was intermittently receiving alerts about the following error coming from requests through the PI web API client:

HTTPSConnectionPool(host='[redacted], port=443): Max retries exceeded with url: 
/piwebapi/attributes?path=[redacted] (Caused by ConnectTimeoutError(
urllib3.connection.HTTPSConnection object at 0x7fbf482d9a20, 
'Connection to [redacted] timed out. (connect timeout=None)'))

I saw that the client's API methods do accept _request_timeout arguments, but those arguments are not actually passed through to the request, so they don't do anything. This PR does two things:

  1. Fixes the implementation of the _request_timeout arg so that it works as intended
  2. Adds a default timeout. With no default in place, the timeout depends on the host system, which can cause issues when the application moves between platforms, as happened in my case.

We have been running this branch in production and our timeout issues are resolved.

@mike-eh2
Copy link
Author

@dcbark01 looks like this repo is unmaintained but I'm hoping you get a notification about this and consider approving it. Maintaining a public fork would be problematic for my team, but making our fork private would impose some technical challenges for our build pipeline, so getting this merged into the upstream would be ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant