Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing a calendar with vdirsyncer hangs #114

Open
ergofroggy opened this issue Nov 22, 2019 · 2 comments
Open

Syncing a calendar with vdirsyncer hangs #114

ergofroggy opened this issue Nov 22, 2019 · 2 comments

Comments

@ergofroggy
Copy link

When trying to perform an initial sync of a large-ish calendar (all files amount to 1.5MB) using vdirsyncer, the xandikos server takes several minutes to seemingly prepare the reponse. Once it actually sends it back, it seems vdirsyncer doesn't pick it up and just indefinitely hangs. The xandikos server keeps on functioning and subsequent syncs to other devices keep working.

Looking at the xandikos logs, the server spends a lot of time after </C:calendar-multiget>. It then responds with the full calendar file. During the time between these two events, the xandikos server uses 100% CPU.

Vdirsyncer debug log:
https://privatebin.net/?e048e5abc9bfb7c4#CuxjWzChFD8k3q2rJSRr3X4YgzgdyRhJKfsjeuVPerLQ

xandikos server log:
https://privatebin.net/?62d916c68ad9dab1#Br1E4MnoQMe6gxnEbcxQXJ2KRqBxedrHdPZd79JJJCEx

My vdirsyncer config:

[general]                                                                        
status_path = "~/.local/share/vdirsyncer/status/" 

[storage local_calendar]
type = "filesystem"
path = "~/.local/share/vdirsyncer/calendar"
fileext = ".ics"

[storage xandikos_calendar]
type = "caldav"
url = "https://xandikos.mydomain.org"
username = "user"
password.fetch = ["command", "pass", "dav/mydomain.org"]

My xandikos config

[uwsgi]
socket = 127.0.0.1:8001
uid = xandikos
gid = xandikos
master = true
cheaper = 0
processes = 1
plugin = python
module = xandikos.wsgi:app
umask = 022
env = XANDIKOSPATH=/var/lib/xandikos/collections
env = CURRENT_USER_PRINCIPAL=/user/
# Set AUTOCREATE to have Xandikos create default CalDAV/CardDAV
# collections if they don't yet exist. Possible values:
#  - principal: just create the current user principal
#  - defaults: create the principal and default calendar and contacts
#       collections. (recommended)
env = AUTOCREATE=defaults

Nginx site block

    server {
        listen 443 ssl; # managed by Certbot
        ssl_certificate /etc/letsencrypt/live/mydomain.org/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/mydomain.org/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

        if ($scheme != "https") {
            return 301 https://$host$request_uri;
        } # managed by Certbot

        server_name xandikos.mydomain.org;
        
        client_max_body_size 50M;
        error_log /var/log/nginx/xandikos_error.log;
        access_log /var/log/nginx/xandikos_access.log;
        location / {
            auth_basic "Please login";
            auth_basic_user_file /etc/nginx/.htpasswd;
            include uwsgi_params;
            uwsgi_read_timeout 60000;
            uwsgi_pass 127.0.0.1:8001;
            access_log /var/log/nginx/xandikos_access.log;
            error_log /var/log/nginx/xandikos_error.log;
        }
    }
@jelmer
Copy link
Owner

jelmer commented Nov 22, 2019

Is this perhaps a performance issue in vdirsyncer? Does it work if you attempt the same sync with only a few files from the calendar?

@jelmer
Copy link
Owner

jelmer commented Dec 1, 2019

It looks like the pastebin links have expired.

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

No branches or pull requests

2 participants