Comments (11)
Could you clarify what request took more than 30 seconds?
from orionsdk-python.
Hi,
Its a swis query, where I select all Cisco confines which do not have ssh enabled, only I confine the considered configurations to the most recent ones, which are a bit cumbersome - the equivalent sql query takes 90-120 seconds to execute.
from orionsdk-python.
Hi, I'm looking to implement timeouts also. I have another python module that uses requests and have gone through that adding in a timeout parameter to prevent issues with expired licenses causing the API to not respond correctly causing a non-response.
I was wondering if the Solarwinds API implements a standard timeout (as i see none in the swis client) or will the connection stay open indefinitely causing the initiating query to not receive a response?
from orionsdk-python.
Requests on the REST API have a 30 second timeout. This is not configurable or overridable at this time.
from orionsdk-python.
@tdanner Thanks for the confirmation.
from orionsdk-python.
In the orionsdk/swisclient.py can we edit line ~50 and add "timeout=15" to have the requests
module have a 15 second timeout?
http://docs.python-requests.org/en/master/user/quickstart/#timeouts
from orionsdk-python.
Yes, you could tell requests to use a shorter client-side timeout. I don't think that this will affect what happens on the server though.
from orionsdk-python.
I just realized the original opening of this issue seems to be for the server side, my request is to add the timeout into the SDK client code as the requests
python will never timeout, if it is not set.
Example reason why it would be a good idea to add this to the client:
I have a script that checks our SolarWinds instances for some data which does a swis.query()
in a loop for each instance. If one of those instances is offline, or the network is down, my loop will never fail or error out as the requests
module just sits waiting. I would be nice if the requests
module had a hard set, or even configurable timeout of 15-30 seconds so that I can write a nice try/catch on the loop.
I can do a pull request if you'd like, but it is just a add of timeout=30,
to line 54 in the swisclient.py
. This would set the client SDK to the same timeout as the Orion server API timeout.
from orionsdk-python.
Your reasoning makes sense to me. PRs welcome. :)
from orionsdk-python.
Considering the fix for this has been implemented in PR #28 and documented in the README how to implement a timeout can someone close this issue as it appears to be resolved?
from orionsdk-python.
As @superadm1n noted, this has been resolved by #28.
from orionsdk-python.
Related Issues (20)
- Unable to get resources list of a node HOT 10
- OrionSDK not permanently setting interface status on Node HOT 1
- requests.exceptions.HTTPError: 400 Client Error: Update or insert of view or function 'dbo.NCM_Nodes' failed because it contains a derived or constant field. HOT 1
- SVI showing None for InAveragebps HOT 5
- snmp-testing HOT 5
- SNMPv3 RW Credentials
- Issue with Updating Custom Properties HOT 6
- Unable to find poller_type for creating node HOT 3
- Disabling specific sensors via python HOT 1
- SettingValue(credentialID) is not getting updated HOT 1
- How to test for SNMP credentials using Rest API HOT 2
- Use any port number if specified to initialize client
- HTTP Connection Issue: Authentication Failed
- SwisClient bulkdelete method not in PyPi HOT 1
- SolarWinds Duplicate ICMP Device Listings
- Question on Suppress Alerts
- 403 Client Error: Access to Orion.AlertSuppression.SuppressAlerts verb denied
- pip install orionsdk gets version 0.3 HOT 5
- Connection aborted.', ConnectionResetError(104, 'Connection reset by peer
- Python syntax to override port to use 17774 instead default 17778 to connect to orion ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orionsdk-python.