pimutils / pimutils/vdirsyncer
`Server disconnected` errors seemingly introduced by move to `asyncio`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 185
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 1
Description
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.7docker container- docker engine
20.10.23 - Synology DSM
7.2.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is identified in the report. Start by reproducing the Server disconnected and Session is closed sequence with vdirsyncer 0.19.2 versus 0.18.0, then trace the asyncio-related connection behavior; done means identifying a reproducible cause or a defined way to limit connections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100