Wonderfall/dockerfiles

upload issues with boring-nginx and nextcloud 11.0.2

ovizii opened this issue · 5 comments

I know I am not on the latest version but I had the same issues with nextcloud 10 too. I will try and update to nextcloud 12 towards the weekend but I doubt that will fix the issues.

The problem is the issues are intermittent so I am struggling to figure out the cause.

We are using both your containers on a hosted server and for all these tests I am using the same nextcloud user. The max upload size is set to 10G.

  • from home, uploading a 160MB file works with FF and Chrome
  • from work,, uploading a 160MB file works with Chrome only (same browser versions as above and there is no outgoing Firewall/Proxy in use)
  • a client, from inside his corporate network, can't upload a 160MB file with any browser.

For the test I log on with the client credentials and create a folder. "Sometimes" I then try to enter the folder to upload and I get: "Operation not permitted" and am not able to enter this folder I just created. Logging onto another computer with the same credentials I can enter the folder.

When the 160MB file fails to upload, the upload is aborted with the error: "Connection to server lost".

Any idea what to look into? The nextcloud logs rare not showing any irregularities and neither does the nginx log.

Can you please post your boring-nginx conf?
You need to set client_max_body_size 10G; in this config.

OK; so this is the vhost file:

server {
  listen 8000;
  server_name portal.mydomain.tld;
  return 301 https://$host$request_uri;

  client_max_body_size 0M;
}

server {
  listen 4430 ssl http2;
  server_name portal.mydomain.tld;

  ssl_certificate /certs/portal.mydomain.tld.pem;
  ssl_certificate_key /certs/portal.mydomain.tld.key;

  #include /etc/nginx/conf/ssl_params;
  include /etc/nginx/conf/headers_params;
  include /conf.d/extra.conf;

  client_max_body_size 0M;

  location / {
    proxy_pass http://nextcloud-11:8888;
    include /etc/nginx/conf/proxy_params;
  }
  location /.well-known/ {
        root /www;
  }

error_log /var/log/nginx/portal-error.log;

}

the included extra.conf which cobbled together to solve various problems, probably introducing more in the process:

ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Proxy "";
proxy_set_header Connection "upgrade";
proxy_buffer_size               8k;
gzip                            off;

I hope you can spot something. As far as I remember, the SSL stuff I had to change as some people using older browsers had trouble connecting to nextcloud. the other stuff I can't remember but it was all to solve various issues.

@ovizii as hoellen said. In you config file the client_max_body_size is set to 0M.

Please change both lines with:
client_max_body_size 0M;
to

client_max_body_size 10G;

Thanks. I will do so and let you know how things go. I have set it to 0 because according to nginx dos that is the same as unlimited. => http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

I'll post back later this week after testing it with "10G"

Unfortunately this change had absolutely no effect. I changed these 2 values then restarted the nginx proxy container and tried the same scenario as initially described but got the same failure message as described above.