Nextcloud on VPS - file upload problem

vps

#1

Hello all,

I’ve successfully installed an instance of Nextcloud 11 on a subdomain of my VPS server running PHP 5.6 and MySQL.

I’m running into an issue uploading files larger than 60-70 MBs. When uploading through the browser, Nextcloud goes through the motions, but the upload ends with an error. Here’s a typical example from Nextcloud’s log file:

Exception: {“Message”:“HTTP\/1.1 400 expected filesize 77039616 got 57208832”,“Exception”:"Sabre\\DAV\\

I believe this is a server configuration issue. Is the upload script timing out? The file sizes could be a clue. Here’s what’s in my phprc file:

upload_max_filesize=1G
post_max_size=1G
memory_limit=512M
max_input_time = 3600
max_execution_time = 3600
output_buffering=0
extension=xcache.so

Can anyone help troubleshoot further? Any Nextcloud users out there?


#2

I have same problem :frowning:


#3

I’m not surprised to read this. Uploads of large files via Apache and PHP have always been an issue. There are some tweaks that can be done on the VPS or dedicated server to allow for longer processing times in PHP applications, but frankly those are not the solution. We should take this issue to Nextcloud and make sure the application allows for uploading large files in chunks, not all in one single gigantic go. Their documentation doesn’t seem to mention this capability and I haven’t played with nextcloud on VPS: https://docs.nextcloud.com/server/9/admin_manual/configuration_files/big_file_upload_configuration.html

Anyway, we need to understand what happens on your server, why the process dies. Can you check the httpd logs to see if there is something more explicit than the error you see on nextcloud log? Also, are you using FastCGI on your VPS?


#4

I don’t see any errors related to my upload in /home/logs/cloud.snmediaworks.com/http/error.log. Is this the error log you’re asking about?

cloud.snmediaworks.com is the sub domain where I’ve installed my Nextcloud server.

I’ve tried running with FASTCGI on and off, as well as with PHP 5.6 and 7.0. It doesn’t seem to make a difference.


#5

uhm …

I’m reading on https://central.owncloud.org/t/expected-filesize-xxx-got-yyy-0/816 (and the documents linked from there) some other things you may want to check:

  • any chances that the users still having this problem having a “LimitRequestBody” with a low value in their Apache config?
  • An wrong configured “output_buffering” setting. Try to set “output_buffering” to “Off” in your php.ini
  • someone claimed to have fixed the issue by changing SSLRenegBufferSize to 10486000 in apache conf
  • have you tried changing the upload tmp dir? (this seems like a long shot to me)

last, you may want to open a ticket and check with DreamHost support what other configuration options you may request that are not available directly to VPS users. Keep us posted! Thank you