Nextcloud 15 is being unstable using data folder via smb

So I have NC 15 installed on a VPS with 2 cores, 4 GB of RAM and 40GB SSD. I have attached a network drive using smb onto /var/www/data.

When uploading data on a non admin user, I get so many errors about uploading but nothing in the logs?

For example:

There is nothing in my logs? This is a fresh install of NC 15 running Nginx in front with all the recommeded settings from the NC installation docs.

What or what could be causing NC to be so unstable?

Please provide some additional information about how you mount the smb share to /var/www/data, especially mount options and smb permissions.
I guess its something there rather then NC being “unstable”.

Okay,

Using /etc/fstab I mount my smb share with:

//user.domain.com/backup /var/www/nextcloud/data cifs rw,user=user_id,pass=user_password,uid=33,gid=33,file_mode=0660,dir_mode=0770 0 0

It has happened when I tried to upload a folder which is 562 MB but because of the errors which pop up, NC only uploads 526 MB.

What do you think?

Another error I get if I were to upload the missing files is:

failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#467

Does it have something to do with the deep folder structure?

Sure nothing in any of the logfiles (Nextcloud, webserver, proxy)?

As admin user you can upload?

Just from looking around, I am not sure if they are related but I have found these errors:

Nginx error log:
[error] 1171#1171: *3 access forbidden by rule, client: 0.0.0.0, server: domain.com, request: "GET /data/.ocdata?t=1549149440390 HTTP/2.0", host: “domain.com”

Another error I do get when I try to upload files is:
Sabre\DAV\Exception: Error while copying file to target location (copied bytes: 0, expected filesize: 18503 )

The PHP-FPM log seems ok.

After trying to upload a folder which is 562 MB, I see this error in my FPM log which I missed before:

WARNING: [pool www-data] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 22 total children

I used the recommeded settings from the NC install guide?

In my Nginx error log, I think this might have something to do with it:
upstream timed out (110: Connection timed out) while reading response header from upstream

Something to do with PHP-FPM? My settings? I am unsure what to change.

Is this your proxy? The

Sabre\DAV\Exception: Error while copying file to target location (copied bytes: 0, expected filesize: 18503 )

error is often related to some timeouts of the connection between servers (webserver and php or webserver and proxy).

The need to increase the number of php processes is no problem per se, but it could lead to some more delays. If the message pops up all the time, check the number of php processes, max connections of your webserver and your proxy. E.g. if your proxy take far more connections than your php can handle in the end.

Yes that is the log from nginx/error.log

Okay, thanks for the suggestion. I am a little stuck on what to change as I followed the NC guide and used the tuned settings for PHP FPM. Do you know what settings I may need to tweak?