GitlabHttpError: 500 means gitlab responded with a 500 error. The most likely cause of this is that you are requesting too much data at once.
One key issue here is that
visibility is not a valid keyword for this method, so it will be completely ignored. This means, in effect, you're asking for all open merge requests on GitLab.com, which would be way too much data to return in a single request, hence GitLab bails out and returns a 500.
To see a valid list of keywords, see the merge requests API documentation.
Unfortunately, this API does not support pagination. As a workaround for this, you can list your relevant projects first using the list projects API which does support
visibility as a filter. For each project, you can list all of its merge requests.
Because these endpoints are paginated, it doesn't matter how many projects or MRs there are, you will be able to request them all (with multiple paginated requests, handled by the python-gitlab wrapper)
all_private_mrs = 
for project in gl.projects.list(visibility='private', as_list=False):
for mr in project.mergerequests.list(as_list=False, state='opened'):
To speed this up, you can increase the
per_page argument and use keyset pagination.