Cannot Sync Certain Files or Create Certain Files Through Direct Upload

Nextcloud version:12.0.4
Operating system and version : Ubuntu
Apache or nginx version: Apache 2.4.29
PHP version: 7.0
Is this the first time you’ve seen this error?: Yes

Can you reliably replicate it? (If so, please outline steps):

The issue you are facing:
Trying to upload files, some get uploaded, some do not. Seems to be issues with hidden files and larger files for the most part. I have checked and confirmed that the max upload size is 2GB on the subdomain, and is set as so in NextCloud as well. I have the data directory outside of public_html (shared host), which I have done before. Trying to do it inside the subdomain directory does not change anything.

The output of your Nextcloud log in Admin > Logging:
These are the errors I’m receiving. Errors separated by *
https://pastebin.com/dwSwaBJG

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
https://pastebin.com/uQ8R8Hid

The output of your Apache/nginx/system log in /var/log/____:
Shared host, didn’t have this problem under vps hosting (DigitalOcean)
Error log from NextCloud Desktop client
https://pastebin.com/vD2g9FQd

Error from error log in NextCloud directory
https://pastebin.com/a3R2f2aZ


Remember, this information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart: Feel free to use a pastebin service, otherwise log files can be indented with 4 spaces on each line to present them in a friendlier way on the forum.

[14-Dec-2017 14:41:27 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

This is interesting, it looks like PHP is only allocated up to 128MB of memory, so that would explain why large files are not able to be uploaded. Are you able to increase this limit?

Start here: Uploading big files > 512MB — Nextcloud 12 Server Administration Manual 12 documentation

The memory limit was set to 256. I’ve updated it to 512, that’s the max I can go. I’ve also adjusted the execution time and input time, though I don’t think those were part of the issue. I installed it with Softaculous because I was unable to get the web installer to work (again, shared hosting). I removed everything and I was able to get the web installer to work this time and everything seems to be going smoothly. I have almost 18GB worth of data to upload, so it’ll take a while; however, it seems to be going smoothly this time. Fingers crossed.

Majority of the errors seem to be the following, according the the log in the admin panel.

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT fileid FROM oc_filecache WHERE storage = ? AND path_hash = ?’ with params [2, “f593f4e6f4dc08d8bbd8c093575d090c”]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

The errors from the local desktop trying to upload seem to have remained the same.

You could try restarting MySQL or reboot your server. Server has gone away means it can’t connect to the database.

The database is accessible and I have confirmed that the SQL credentials are valid.

That MySQL error can come up when MySQL runs out of memory. So based on the information you’ve provided so far, php has run out of memory (you said you set the limit at 256 or 512 but clearly the actual limit was 128 at the time it failed) and MySQL likely ran out of memory. Considering that your previous host did not have these issues but the current host does, it seems to indicate that it’s a memory limitation on the host.

What are your current vps specs?