GitLab APIv3: 414 Request URI Too Long

I’m coming across this error when I’m creating notes in GitLab where I’m inserting markup table content as a comment on an Issue. My current work around is to split a larger table up into multiple comments.

To create the note, I’m passing the body as a URL parameter. The markdown text for tables that is URL-encoded gets long pretty quickly without having a lot of content. Anyhow, because the data is submitted as a URL parameter, I’m getting 414 errors from my local GitLab CE instance. I’m looking into configuring Nginx to allow larger URI’s, but that isn’t a real solution.

As a shot in the dark, I tried sending the body text as JSON in the POST request body, but that doesn’t work.

{ "body":"| Column 1 | Column 2 | etc. etc." }

Is there another way I can add long comments to an issue?

Thanks in advance,


####UPDATE 2016.08.17-13:51:51
I added the following line to /var/opt/gitlab/nginx/conf/gitlab-http.conf:

large_client_header_buffers 4 16k;

It seems to do the trick for me for the time being. I didn’t see an option in /etc/gitlab/gitlab.rb for this setting, so I’ll likely need to make it again next time I reconfigure.

####UPDATE 2016.08.17-14:06:55
I changed the buffer setting in /var/opt/gitlab/nginx/conf/gitlab-http.conf to:

large_client_header_buffers 8 32k;

With further testing, I unfortunately still get the 414 error, so I still need to split my table into multiple notes.

There is an option to add arbitrary Nginx configuration in gitlab.rb that will be added to the Nginx config when you run reconfigure. I don’t have it in front of me at the moment, but it shouldn’t be too hard to find.