Skip to content

Split merge request listing into small batches to avoid 502 errors

Chris Burr requested to merge split-gitlab-api-requests into master

GitLab has started complaining when too many IDs are requested at the same time so batch them:

$ curl -L 'https://gitlab.cern.ch:443/api/v4/projects/401/merge_requests?iids%5B%5D=2960&iids%5B%5D=3057&iids%5B%5D=3052&iids%5B%5D=3048&iids%5B%5D=3034&iids%5B%5D=2818&iids%5B%5D=3049&iids%5B%5D=3047&iids%5B%5D=3046&iids%5B%5D=2740&iids%5B%5D=2958&iids%5B%5D=3044&iids%5B%5D=2881&iids%5B%5D=3030&iids%5B%5D=3038&iids%5B%5D=3039&iids%5B%5D=3037&iids%5B%5D=3041&iids%5B%5D=3018&iids%5B%5D=2951&iids%5B%5D=2908&iids%5B%5D=3032&iids%5B%5D=3027&iids%5B%5D=3028&iids%5B%5D=3031&iids%5B%5D=3026&iids%5B%5D=3029&iids%5B%5D=3017&iids%5B%5D=3023&iids%5B%5D=3025&iids%5B%5D=3019&iids%5B%5D=2992&iids%5B%5D=3007&iids%5B%5D=3020&iids%5B%5D=3021&iids%5B%5D=3000&iids%5B%5D=2902&iids%5B%5D=2994&iids%5B%5D=3016&iids%5B%5D=2959&iids%5B%5D=2741&iids%5B%5D=3014&iids%5B%5D=3013&iids%5B%5D=3015&iids%5B%5D=3009&iids%5B%5D=2952&iids%5B%5D=3010&iids%5B%5D=3011&iids%5B%5D=3006&iids%5B%5D=3008&iids%5B%5D=2937&iids%5B%5D=3004&iids%5B%5D=2999&iids%5B%5D=2843&iids%5B%5D=2993&iids%5B%5D=2996&iids%5B%5D=2983&iids%5B%5D=2997&iids%5B%5D=2998&iids%5B%5D=2987&iids%5B%5D=2944&iids%5B%5D=2977&iids%5B%5D=2990&iids%5B%5D=2991&iids%5B%5D=2989&iids%5B%5D=2988&iids%5B%5D=2986&iids%5B%5D=2984&iids%5B%5D=2982&iids%5B%5D=2962&iids%5B%5D=2981&iids%5B%5D=2980&iids%5B%5D=2978&iids%5B%5D=2974&iids%5B%5D=2904&iids%5B%5D=2945&iids%5B%5D=2969&iids%5B%5D=2955&iids%5B%5D=2972&iids%5B%5D=2973&iids%5B%5D=2971&iids%5B%5D=2976&iids%5B%5D=2750&iids%5B%5D=2942&iids%5B%5D=2934&iids%5B%5D=2968&iids%5B%5D=2970&iids%5B%5D=2932&iids%5B%5D=2691&iids%5B%5D=2967&iids%5B%5D=2956&iids%5B%5D=2963&iids%5B%5D=2964&iids%5B%5D=2935&iids%5B%5D=2961&iids%5B%5D=2913&iids%5B%5D=2860&iids%5B%5D=2875&iids%5B%5D=2957&iids%5B%5D=2954&iids%5B%5D=2948&iids%5B%5D=2953&iids%5B%5D=2938&iids%5B%5D=2929&iids%5B%5D=2946&iids%5B%5D=2950'
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

cc @pkoppenb

Merge request reports