I’m using the Python package pyapi-gitlab as a wrapper to access the GitLab API. When I get all the milestones (max 5 per project) for the 14 projects on my account on https://gitlab.com, it takes more than 20 seconds. Is the API access throttled/rate-limited? Why is accessing the API so slow?
There is a rate limit that can be configured, yes. See http://doc.gitlab.com/ce/security/rack_attack.html. I don’t know the exact limits gitlab.com has, though.
I did find these two parameters in the gitlab.rb.template file.
gitlab_rails['rate_limit_requests_per_period'] = 10 gitlab_rails['rate_limit_period'] = 60
I’m curious if someone can find out these settings for https://gitlab.com/.
Based on my rough benchmark tests, the settings appear to be:
gitlab_rails['rate_limit_requests_per_period'] = 1 gitlab_rails['rate_limit_period'] = 60
On gitlab.com we use the default values from omnibus-gitlab for rate limiting. (No custom values in Chef.)
Oops. I was using the incorrect units. My benchmark tests are showing about 1 sec per API call to gitlab.com, which would imply 60 calls per 60 sec period.
Changing the value of the ‘rate_limit_requests_per_period’ in gitlab.rb and reconfigure-ing didn’t change the speed of API calls to my locally-installed instance of GitLab.
@jacobvosmaer - My program is the only one making API calls to my instance of GitLab. Is there a way to speed up the API calls via configuration settings (or other software mods), or are the API calls as fast as they are going to get?
@celiao I don’t know any special options you could set but you are welcome to see if you can improve the performance.