im running Nextcloud 11.0.3 in a shared hosting environment which runs quite well except for one problem: If an upload takes more than 60 seconds, it ends with an âinternal server errorâ.
EDIT: The upload continues for longer than 60 seconds. The error occurs after the upload finishes. The uploaded file, unfortunately, doesnât appear in the Nextcloud file interface.
The root cause for this is very probably the timeout of the MySQL server, which is set to 60 (while PHP execution time is 240).
Furthermore, at each failed attempt, nextcloud creates a log entry saying â2006 MySQL > server has gone awayâ.
The file gets uploaded completely (a file ending with .part exists on the server, invisible from within nextcloud), because of the timeout the rename of this *.part file seems to fail.
My hosting provider (www.goneo.de) doesnât allow me to change the MySQL timeoutâŚ
So my questions are: Is there anything I can do about this? Is there anything Nextcould could do about this (= should I file a bug report)?
Why canât nextcloud just open a new connection to the SQL server if the previous is gone?
Iâm quite sure that it isnât a php issue - it occurs if the upload takes more than 60 seconds. To clarify: the upload is not cancelled by the error. It finishes (taking more than 60 seconds), then the error occurs (saying that the SQL server went away).
If I log into my webspace by ssh, I find a file ending with .part with exactly the size of the uploaded file. This file doesnât appear in nextcloud, but it is there on the server, proving that the file got uploaded correctly, just the rename didnât work (presumably because it needs to change some entry in the database which has gone away after 60 secondsâŚ)
And Iâm also sure it is related to time - because it occurs with different file sizes depending on network bandwith. I have this problem usually when using the iOS client from mobile network. Because itâs slower. From my highspeed internet at home iâve got the problem only with large files which take longer to upload.
So yes, Iâm quite positive itâs caused by the MySQL timeout.
I am having the very same problem. I use Nextcloud 12.0.5 at a shared hosting provider. When I upload a 70MB file via the web interface, this takes 10 to 15 minutes, then I see the error message âinternal server errorâ at the end. But the file itself has fully arrived at the file system on the server, just with a temporary file ending. The server log then shows the ââŚSQL server has gone awayâ error message.
I am pretty sure that my php settings are not the probem. I am nearly 100% sure now, because I convinded my hosting provider, to temorarily increase the mysql timeout setting, and then the upload worked fine. But now he returned to this ânormalâ value This values is set to 6 minutes he says.
I have also tried to add the following line to config.php of the nextcloud installation:
âdbdriveroptionsâ => array(PDO::MYSQL_ATTR_INIT_COMMAND => âSET wait_timeout = 28800â)
But this did not help.
Question: Is there any existing solution to this? Do I need to open a new bug report?
I found a solution (or at least explanation) for my case: When I do the connection in the browser via http instead of https (as was my default), then uploading larger files works fine again.
I think this is not how it should be, Iâll try to file a bug report about this lateron.