Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
amk_
Explorer

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_

0 Kudos
5 Replies
amk_
Explorer

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.

0 Kudos
PhoneBoy
Admin
Admin

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?

0 Kudos
amk_
Explorer

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.

0 Kudos
PhoneBoy
Admin
Admin

Send me the TAC SR in a PM, I'll ask R&D about it.

0 Kudos
PhoneBoy
Admin
Admin

I checked with R&D and we are planning to optimize this particular API query, but no ETA. 

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events