Open ecksun opened 6 years ago
Running the same config but with 931c149123204189de26265b382b93631b675001 and uwsgi like:
uwsgi --socket /tmp/xandikos.sock --need-plugin python3 --module=xandikos.wsgi:app --virtualenv ./venv/
Did not exhibit the same issues
Running it again with master, but with this uwsgi config:
[uwsgi]
socket = /tmp/xandikos.sock
uid = xandikos
gid = xandikos
master = true
cheaper = 2
processes = 4
plugin = python3
module = xandikos.wsgi:app
umask = 022
chmod-socket = 660
virtualenv = /var/lib/xandikos/xandikos/xandikos/venv
env = XANDIKOSPATH=/var/lib/xandikos/collections
env = CURRENT_USER_PRINCIPAL=/ecksun/
# 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
env = XANDIKOS_DUMP_DAV_XML=1
I get the errors again, I'm thinking its related to processes = 4
Changing to this:
cheaper = 0
processes = 1
Seems to solve the issues.
So my question is then, is xandikos and its git libraries built for parallel use?
This is working correctly in that xandikos/dulwich catch the race, and throw an exception.
What's missing is that Xandikos needs to act gracefully whenever this race condition happens. Either it can return an error to the client, or it can try again (assuming the file it's trying to change wasn't involved in the racing changes).
I created a pull-request to update the examples just to simplify for people like me, until a real solution can be implemented
When I'm trying to synchronize my entire addressbook I get the following exceptions:
All of them happens more than once.
I'm using the following configuration:
version: 0.0.6-1~bpo9+1 (debian stretch)
nginx config:
and uwsgi config: