Skip to content

Do not stop sync when error occurs #5187

Closed

Description

@Trefex

Expected behaviour

In big installations, and due to current limitations around the file watcher (See #2297), the sync client could "skip" over failed syncs and go until the end, and then display an error message.

Actual behaviour

The client stops to sync, starts full scan again, gets stopped on same spot, and then we are in a loop. The sync could never finished. Sometimes, it is not advisable to fix the error immediately as it could be more time consuming.

Steps to reproduce

  1. Have a lot of files.
  2. Sync encounters error.
  3. Sync stops.

Server configuration

Operating system: CentOS 7.2
ownCloud version: 9.0.5

Client configuration

Client version:
Operating system: Ubuntu

OS language: English

Would it make sense to skip errors, except in conflict cases for instance, so that the other non affected folders can at least synchronize?

Thanks,
T

Activity

  1. ogoffart commented on Sep 21, 2016

    @ogoffart
    Contributor

    What error exactly is it?

    The errors which stop the sync are usually only connection problems.

  2. guruz commented on Sep 26, 2016

    @guruz
    Contributor
  3. added this to the 2.3.0 milestone on Sep 26, 2016
  4. Trefex commented on Sep 29, 2016

    @Trefex
    Author

    @ogoffart We have more information it seems. @rmtfleming has the issue that he seems to hit an User Rate Limit Exceeded error with Google Drive and this results in a "Service Unavailable" error on the Linux client.

    This in turn leads to "Operation cancelled", and the sync starts again from the beginning.

    My view on this is that the sync should continue, skip the GDrive errors and try again at a later stage. In the current setup, owncloud files are not sycned anymore since GDrive fails which is sort of strange.

  5. ogoffart commented on Sep 30, 2016

    @ogoffart
    Contributor

    The code contains:

        if (httpCode == 503) {
            // "Service unavailable"
            // Happens for maintenance mode and other temporary outages
            return SyncFileItem::FatalError;
        }
    

    We consider 503 as a fatal error because that's what the maintainnence mode is, and in that case, we don't want to continue.

    In a way, if we hit the user rate limit, continuing is also a bad idea, is it not?

  6. rmtfleming commented on Sep 30, 2016

    @rmtfleming

    This does not seem wise to consider a problem with one external drive to be fatal with respect to all other folders in OC.

  7. guruz commented on Oct 2, 2016

    @guruz
    Contributor

    GDrive? I think we should continue this somewhere else. 9.1.x might already help.
    Please comment on owncloud/core#20481 with your exact experiences. Thanks. :)

    FYI @PVince81

  8. Trefex commented on Oct 3, 2016

    @Trefex
    Author

    @guruz I think it warrants two seperate disucssions.

    In my opinion, the client should not stop sync when it encounters an error that could come from a third party service such as gdrive.

    The fact that we hit that error with gdrive should not be relevant here?

  9. dragotin commented on Oct 3, 2016

    @dragotin
    Contributor

    In fact this is a client bug. We agreed on the following meaning for 503 Service Unavailalbe: If the 503 returns for the sync root, the server is in maintenance and the sync should stop and try later.

    However, if the 503 comes back for a certain directory we ignore that in the sync because it is considered an external storage which is not available and the like.

    We had that behaviour before. If it is gone, it is a regression.

  10. guruz commented on Oct 6, 2016

    @guruz
    Contributor

    @dragotin I don't think it comes back for a directory in this case. The folder structure for the gdrive mount should be in the oc_filecache already, so the discovery should not get a 503 there (@PVince81 correct me if i'm wrong..)

    @rmtfleming @Trefex Can you confirm you get this for an actual file upload/download/move/copy/delete operation and not for the client discovery phase? (So then owncloud/core#20481 would help.)

    For file operations, this issue would be a duplicate of #5088

  11. PVince81 commented on Oct 6, 2016

    @PVince81

    The discovery, if the watcher is enabled (the "check for updates" option) it would call hasUpdated() on the storage which itself usually does a stat() that might throw a StorageNotAvailableException.

  12. ogoffart commented on Oct 10, 2016

    @ogoffart
    Contributor

    @Trefex What is exactly the calls that fails with what error ?

    @dragotin. normaly there should not be regression, if the "User Rate Limit Exceeded" appears on the server while uploading a file, for example, we would get a 503 for the PUT, and that would abort the sync, as expected.
    And in that case iterating over that directory might not produce any error so it would not be ignored.

    So we need that the server returns another error code that this one if we don't want the sync to be interupted.

  13. Trefex commented on Oct 10, 2016

    @Trefex
    Author

    @ogoffart sorry i'm not sure what you mean.

  14. ogoffart commented on Oct 10, 2016

    @ogoffart
    Contributor

    @Trefex What is failling ?

  15. Trefex commented on Oct 10, 2016

    @Trefex
    Author

    @ogoffart according to @rmtfleming, the sync would fail, and then redo a full deep scan. If you have 400 000 files, this could take a while, and then you hit the error, and after few seconds, minutes, it would start again. This results in an unfinished sync and never-ending deep scans of the filesystem.

  16. ogoffart commented on Oct 11, 2016

    @ogoffart
    Contributor

    @Trefex But what is causing the sync to fail?

    As said Earlier, an HTTP 503 error for an upload (PUT) will cause the sync to fail and that's an expected behavior because this error means that any further calls (even for other files) would also fails.

    If you think the error should not produce a 503, then it would be a server bug in the error classification.

  17. Trefex commented on Oct 11, 2016

    @Trefex
    Author

    @ogoffart the error is this one: owncloud/core#20481

  18. ogoffart commented on Oct 11, 2016

    @ogoffart
    Contributor

    Well, the problem is that the server returns an error code that tells the client to abort the sync.
    The server should be fixed to return another error code than 503 which we agree should stop the sync.

    Please comment on owncloud/core#20481 and track it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions