Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

SyncExpriedError: Last sync time is expired #858

Closed
glen-84 opened this issue Mar 14, 2016 · 4 comments · Fixed by #879
Closed

SyncExpriedError: Last sync time is expired #858

glen-84 opened this issue Mar 14, 2016 · 4 comments · Fixed by #879
Assignees
Milestone

Comments

@glen-84
Copy link

glen-84 commented Mar 14, 2016

New installation of CNPM, with this sync config:

    syncModel: "exist",
    syncInterval: "24h",

We get this e-mail every day:

Sync packages from official registry failed.
Start sync time is Sun Mar 13 2016 15:08:24 GMT+0000 (UTC).
Error message is SyncExpriedError: Last sync time is expired in 512752618 ms, lastSyncTime: Mon Mar 07 2016 16:42:31 GMT+0000 (UTC)
SyncExpriedError: Last sync time is expired in 512752618 ms, lastSyncTime: Mon Mar 07 2016 16:42:31 GMT+0000 (UTC)
at checkSyncStatus (/con/home/cnpm/sync/index.js:199:15)
at next (native)
at onFulfilled (/con/home/cnpm/node_modules/co/index.js:65:19).

lastSyncTime is always Mon Mar 07 2016 (possibly the date of installation).

Why isn't the lastSyncTime being updated? How do we fix this? Could it be time zone issues?

Thanks.

PS. It should be SyncExpiredError and not SyncExpriedError.

Edit: Maybe on the first day, because the syncInterval is 24h, it actually tried to sync at just over 24h, which caused the error, and from that point on, it was always late? Maybe it should check syncInterval + 10 mins or something?

Edit 2: From the e-mails, it looks like the first sync was at 16:42:31, and then it tries to sync at 15:08:20.

@glen-84
Copy link
Author

glen-84 commented Apr 4, 2016

@fengmk2 I think that your commit here might be causing this issue.

@dead-horse
Copy link
Member

You'd better keep the sync interval less than 1 hour, keep a large interval doesn't make any sense.

@fengmk2 fengmk2 self-assigned this Apr 4, 2016
@fengmk2
Copy link
Member

fengmk2 commented Apr 4, 2016

@glen-84 yep, syncModel: "exist" should not enable this check. I will make a pr to fix this.

@fengmk2 fengmk2 added this to the 2.x milestone Apr 4, 2016
fengmk2 added a commit that referenced this issue Apr 4, 2016
@glen-84
Copy link
Author

glen-84 commented Apr 4, 2016

@dead-horse See my discussion with @alsotang here (point 4).

@fengmk2 Great, thank you. =)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants