cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1974
Views
5
Helpful
4
Replies

API keep-alive questions

eric.yue
Level 1
Level 1

When can we expect support for keep-alive? Most rest clients is natively supporting keep-alive by default. I'm running blockers where I'm hitting concurrent call limits despite doubling the default value. I'm pulling performance data through a series of get calls.

I'm also unable to find a way to disable keep alive with the rest client I'm using which is ruby gem called rest-client (GitHub - rest-client/rest-client: Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying…). Any help would be appreciated.

4 Replies 4

Spencer Zier
Cisco Employee
Cisco Employee

We resolved the issue that we had with sessions not being cleaned up in PI 3.1.

Often, sending the "Connection: close" header in the request will disable persistent connections in your client, if you're using a version prior to 3.1.

I'm on PI 3.1 however when I'm running several calls at once i'm getting a 503 and 401 error. I've upped the concurrent threshold by 2 and still experiencing the problem. Any idea what's the culprit or info you'd like me to send to you?

The 503 error is a rate limiting error.  Rate limiting is configurable.  If you're seeing intermittent 401s on PI 3.1, the only thing that comes to mind is an external AAA provider (TACACS, RADIUS, SSO, etc.).  See our FAQ item about that.  I did improve some of the stability around external AAA in 3.1.4, so if you haven't, please install that patch.  But even then, if there's too much latency or instability in the connection between PI and the external AAA, 401 and 403 errors will occur.

Thanks Spencer for the info. I've managed to work around the 401's combining several calls into one function in my script through I noticed it's better to give a few second in between each call as well.