Federated Shares showing size of "Pending" "Storage is temporarily unnavailable"

Nextcloud version 16.03
Ubuntu 18.04
Apache/2.4.38
PHP version 7.2.16

The issue you are facing:

Afeter sharing a folder between instances, the web interface displays the folder size as “Pending”. When trying to access it, it replays with “Storage is termporarily not available”.

The logs show a " Sabre\DAV\Exception\ServiceUnavailable:"

Is this the first time you’ve seen this error?

No

Steps to replicate it:

  1. Share a folder with a user in another Nextcloud instance.
  2. The user accepts the share, the folder appears on his web interface
  3. The user can´t access the shared folder.

The output of your Nextcloud log in Admin > Logging:

Sabre\DAV\Exception\ServiceUnavailable: 

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 76:

    OCA\DAV\Connector\Sabre\Directory->getChild("P020_Dubai_BurjDubai")

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 967:

    Sabre\DAV\Tree->getNodeForPath("files/test/ ... i")

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1666:

    Sabre\DAV\Server->getPropertiesIteratorForPath("files/test/ ... i", [ "{DAV:}get ... "], 1)

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 355:

    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)

    <<closure>>

    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

    /var/www/html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:

    call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:

    Sabre\Event\EventEmitter->emit("method:PROPFIND", [ Sabre\HTTP ... }])

    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:

    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

    /var/www/html/nextcloud/apps/dav/lib/Server.php - line 316:

    Sabre\DAV\Server->exec()

    /var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

    OCA\DAV\Server->exec()

    /var/www/html/nextcloud/remote.php - line 163:

    require_once("/var/www/ht ... p")

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

<?php
$CONFIG = array (
  'instanceid' => '*****',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => '',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '16.0.3.0',
  'overwrite.cli.url' => 'https://',
  'dbname' => '',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '',
  'skeletondirectory' => '',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_from_address' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '',
  'mail_smtpport' => '587 ',
  'mail_smtpsecure' => 'tls',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'loglevel' => 2,
  'filelocking.ttl' => 14400,
  'updater.release.channel' => 'stable',
  'mail_domain' => '',
  'mail_smtpmode' => 'smtp',
  'maintenance' => false,
  'simpleSignUpLink.shown' => false,
  'theme' => '',
  'mysql.utf8mb4' => false,
);


The output of your Apache/nginx/system log in /var/log/____:

[Wed Aug 07 06:25:17.133259 2019] [:notice] [pid 4360:tid 140530471225216] FastCGI: process manager initialized (pid 4360)
[Wed Aug 07 06:25:17.134739 2019] [ssl:warn] [pid 26590:tid 140530471225216] AH01909: vmi114328.contaboserver.net:443:0 server certificate does NOT include an ID which matches the server name
[Wed Aug 07 06:25:17.140913 2019] [mpm_event:notice] [pid 26590:tid 140530471225216] AH00489: Apache/2.4.38 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 OpenSSL/1.1.1b configured -- resuming normal operations
[Wed Aug 07 06:25:17.140947 2019] [core:notice] [pid 26590:tid 140530471225216] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 07 08:59:25.699703 2019] [authz_core:error] [pid 4362:tid 140530027820800] [client 85.52.79.29:50369] AH01630: client denied by server configuration: /var/www/nextcloud/config
[Wed Aug 07 09:45:52.209049 2019] [authz_core:error] [pid 4362:tid 140529903851264] [client 85.52.79.29:61457] AH01630: client denied by server configuration: /var/www/nextcloud/config
[Wed Aug 07 11:09:05.563529 2019] [proxy_fcgi:error] [pid 4362:tid 140529777960704] [client 85.52.79.29:56492] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction in /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:141\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(141): PDOStatement->execute(NULL)\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1079): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/nextcloud/lib/private/DB/Connection.php(216): Doctrine\\DBAL\\Connection->executeUpdate('UPDATE `oc_file...', Array, Array)\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(222): OC\\DB\\Connection->executeUpdate('UPDATE `oc_file...', Array, Array)\n#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(214): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/nextcloud/lib/private/Lock/DBLockingProvider.php(314): OC\\DB\\QueryBuilder\\Qu...\n'
[Wed Aug 07 11:40:37.832210 2019] [authz_core:error] [pid 4362:tid 140530111870720] [client 85.52.79.29:40760] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Wed Aug 07 11:59:11.851290 2019] [proxy_fcgi:error] [pid 4362:tid 140529794746112] [client 85.52.79.29:34462] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction in /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:141\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(141): PDOStatement->execute(NULL)\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1079): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/nextcloud/lib/private/DB/Connection.php(216): Doctrine\\DBAL\\Connection->executeUpdate('UPDATE `oc_file...', Array, Array)\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(222): OC\\DB\\Connection->executeUpdate('UPDATE `oc_file...', Array, Array)\n#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(214): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/nextcloud/lib/private/Lock/DBLockingProvider.php(314): OC\\DB\\QueryBuilder\\Qu...\n'
[Wed Aug 07 12:10:32.741988 2019] [authz_core:error] [pid 4363:tid 140530036221696] [client 81.39.110.164:1612] AH01630: client denied by server configuration: /var/www/nextcloud/config

Updated with (hopefully) relevant information from the logs

Ok, so I did some testing. Seems to be a size/complexity issue.

If I send a federated share of a single file or a folder with some files and subfolders in it, everything goes according to plan.

However, the folder I need to share is a 120GB project, with a very strict structure of hundreds of sub folders and thousands of files.

So is this a known issue or limit? or should it work regardless of size and folder structure?

Any help would be useful.

Thanks

I’m having the same issue with Nextcloud 17. I’m the end user trying to access 70GB worth of files.

Is there any progress on this issue? We are facing exact the same beahviour…

We try to share a folder to another NC instance via Federated Sharing which has thousands of files / subfolders. On the remote cloud the column “size” shows “pending” for the shared folder.
After clicking the shared folder the main screen gets blank, the spinner is shown and after 30-60 seconds the screens jumps back and the mentioned error “Storage is temporarily unavailable” is shown, exact the error from the ThreadOwner is in the NC Log.

Both clouds are NC 17.0.3 …

Nothing, I ended up getting a massive single server to host all the data, and mounting external storages if needed.

Federation sounds cool, but it has been a massive pain in the ass every time I´ve tried to use it. I don´t think it´s reliable or resilient enough for deployment yet.

Sorry.

I am also interested in a solution to this.

We are having the exact same issues as described above, size showing pending / Storage is temporarily unavailable with a share of ~15Gb, lots of files.
Smaller shares work as expected.

We are thinking about sharing the big share using the nc sync tool with an account on the source server.

Today October 2020 same problem apparently still unresolved. I am moving from one commercial Nextcloud provider to another. To avoid down-upload between Nextcloud1-PC-Nextcloud2 I tried with federated sharing of 180 GB data between the 2 Nextclouds. The shared directory of Nextcloud1 appears on Nextcloud2, but shows as size “pending” , circle rotating for 4 hours, message “Storage is temporarily not available”
Nextcloud1 version 19.0.2
Nextcloud2 version 19.0.3
Any clue what to do? Any other idea how to transfer files between different Nextcloudservers on the internet?

Same problem here. Both systems running Nextcloud 20.0.1

Folders with less than 1GB of files become available on the system I shared them with.

Folders with more data than that just say “pending” for size … and the circle rotates.

If I could get this to work it would be a gamechanger for me …

Picture:

– Pat

Now after giving 2 weeks time for transfer of files from server 1 to server 2 nothing has changed. The size of the data in the federeated folder is indicated correctly in server 2 but there is no content in it.

Next problem - I tried to get rid of the shared folder in the listing of server 2. I tried to unshare the shared folder in server 2 - error message says “Error deleting file xyz”, same error when trying to delete it.

Any idea how I could get rid of the nonfunctional federated folder?

Some problem here on Nextcloud 20.

Yes. Withdraw the federation on the outgoing instance, it disappears then on the other side as well.

The same issue occurred at my end. And this was solved by setting up the Cron option from the Basic Settings section. The following are the steps:

  1. First you need to enable the Cron option from the Basic Settings section. Let’s open NextCloud as Admin user, go to SettingsBasic settings and select Cron.

  2. You must set up the following cron job to call the cron.php script. For Nextcloud to run smoothly, you will want to set up a cronjob. This is a task that is executed automatically in the background. Modify your Apache/Nginx cronjob:

sudo crontab -u www-data -e

If asked, press “1” to use the nano editor (which is super easy to use) and add the following line to your crontab file:

*/5  *  *  *  * php -f /var/www/nextcloud/cron.php

You have to replace the path /var/www/nextcloud/cron.php with the path to your current Nextcloud installation.

You can verify if the cron job has been added and scheduled by executing:

crontab -u www-data -l

Which returns:

*/5  *  *  *  * php -f /var/www/nextcloud/cron.php

This Cron method enables the execution of scheduled jobs without the inherent limitations the Web server might have.

[https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html]