pimutils / vdirsyncer

📇 Synchronize calendars and contacts.

Home Page:https://vdirsyncer.pimutils.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Server disconnected` errors seemingly introduced by move to `asyncio`

mr-scrawley opened this issue · comments

I've been struggling with sporadic disconnection errors that I initially chalked up to caldav service provider. After an update to the underlying OS where I run vdirsyncer (see environment below), every single attempt started to fail with disconnection errors. The logs showed the following pattern:

Multiple instances of:

error: Unknown error occurred for REDACTED: Server disconnected

Followed by one instance of:

error: Unknown error occurred for REDACTED: Session is closed

Because the debug logs show no further information on what might have caused the server to disconnect, these appear to be hard disconnects by the server without the client doing anything wrong, protocol-wise.

I suspected that some form of rate-limiting by my caldav service provider might be the cause. Because the same basic setup used to work fine, I decided to go through the vdirsyncer changelog to see any major changes that might fit the theory. Suspecting the change to asyncio with version 0.19.0 might have increased server load I decided to try out 0.18.0 which seems to completely fix the issue. I have done multiple successful syncs with that version now.

Of course I don't really have any evidence that rate-limiting is to blame and the only way to really know is by getting in touch with the right people at my service provider which may be a longshot.

I decided to create this issue for reference as I hadn't found any related issues. I assume this is kind of a rare case that really should be addressed by my provider or me changing provider 😅 . Or is there any way to limit the amount of connections somehow? Or maybe something already planned for the 1.0 release which might fix this or provide a configuration option?

My environment:

  • vdirsyner 0.19.2
  • python:3.7 docker container
  • docker engine 20.10.23
  • Synology DSM 7.2.1