- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Gaia API fails after 30 seconds
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Gaia API fails after 30 seconds
Hi,
I would like to check if there is any development related to query from 2019: https://community.checkpoint.com/t5/API-CLI-Discussion/Web-API-timeout/m-p/52741
I am trying to get list of all interfaces from Gaia API 1.7, R81.10, specifically the vlan interfaces.
This works fine for devices where there is only a handful of vlans, but as soon as the information retrieval takes more than 30 seconds, I get back 500 and the login session gets closed.
When I try to loop via all physical and bond interfaces using them as parent argument for the call show-vlan-interfaces, at times I get the result but again, as soon as there are more vlans to return, problem is back.
The other thread indicated the timeout is related to apache, it is 5 minutes and it is not configurable/controllable.
Now the server seems to be gunicorn, is there any hint available on handling queries that take longer than 30 seconds?
Thanks in advance
amk_
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For anyone interested in the topic, support provided instruction about increasing web server timeout.
There is no intention to optimize the handling of the query itself. Listing interface vlans in expert CLI (ifconfig) takes no time, there is no reason the API call needs to take minutes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A CLI does not have to buffer the output whereas the API does.
If the particular call has a lot of data on it (i.e. you have a lot of VLANs), it can take the API server a while to respond.
This is why, in general, we recommend making smaller, more focused API calls.
How are you calling the API now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not about a buffer. I do not see how to make a call for show-vlan-interfaces more granular.
Other APIs do not experience similar issue, this particular one is sub-optimally implemented. We had a support case and the conclusion was that Checkpoint is not going fix it. It takes approximately 1.5 seconds per returned interface and with more than 20 interfaces the Gaia web server timeout is reached and 500 error is reported. Increasing the timeout at GAIA side can only up to the client timeout, and with many vlans it remains not scalable.
Listing the interfaces with ifconfig | grep bond. is instant, so I ended up with expect and ssh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Send me the TAC SR in a PM, I'll ask R&D about it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked with R&D and we are planning to optimize this particular API query, but no ETA.
