pimutils / vdirsyncer

📇 Synchronize calendars and contacts.
https://vdirsyncer.pimutils.org/
Other
1.55k stars 160 forks source link

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

Open mr-scrawley opened 5 months ago

mr-scrawley commented 5 months ago

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 :sweat_smile: . 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: