Quantcast
Channel: Nginx Forum - Other discussion
Viewing all articles
Browse latest Browse all 972

Error when uploading files to Jira through Nginx

$
0
0
Hi,

We are running Nginx in front of several of our different webpages/services. Among others Jira is one of them. We are now facing a problem when trying to upload larger files to Jira. In Jira the default attachments size is 10MB. I have raised that to 100MB. In Nginx config I added this line:

"client_max_body_size 100M;"

What happens is that I am somehow able to upload files up to 19,99MB but not above. Strange?! When trying with files larger than 20MB, I get the following error:

"Cannot attach file [filename]. Browser made bad request to the server"

To avoid any timeout issues I then added the following lines to Nginx config:

proxy_connect_timeout 300000;
proxy_send_timeout 300000;
proxy_read_timeout 300000;
send_timeout 300000;

No changes I am afraid.

Here is my entire Nginx Jira config:

server {
listen 80;
server_name jira.company.com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://servername:8080;
client_max_body_size 100M;
proxy_connect_timeout 300000;
proxy_send_timeout 300000;
proxy_read_timeout 300000;
send_timeout 300000;
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS"; (this parameter made no difference here)
}
}

And here is my Jira server.xml:

<Connector port="8080"

maxThreads="150"
minSpareThreads="25"
maxSpareThreads="75"
connectionTimeout="20000"
enableLookups="false"
maxHttpHeaderSize="8192" (I have tried raising this default number too, but no changes)
protocol="HTTP/1.1"
useBodyEncodingForURI="true"
redirectPort="8443"
acceptCount="100"
disableUploadTimeout="true"
SSLEnabled="false"
scheme="https"
secure="true"
proxyName="jira.company.com"
proxyPort="443"
/>

To verify that "client_max_body_size" parameter is working on my server at all, I changed that parameter for another webservice and it worked.

If I bypass the Nginx server, files are uploaded to Jira as they are supposed to.

Has anyone ancountered anything similar? I have been running this problem back and forth with Atlassian support but it seems they have given up and beleive Nginx is the source of the error and I can not really blame them for thinking so.


Any help appreciated!

Cheers
thg

Viewing all articles
Browse latest Browse all 972

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>