Marten,
I am encountering similar database deadlock issue as Egoitz described and
try to fix (here https://sourceforge.net/p/davical/mailman/message/34986381/
and here https://sourceforge.net/p/davical/mailman/message/35006191/) with
Postgres on Linux.
For testing with client, I used various version of Contacts.app on Mac OS X
10.9, 10.10, 10.11...
With the following config, no issue...
When I try to sync 5 contacts, five are effectively stored to the server...
the others are not...
Srl config:
AWL version 0.55
Davical version 1.1.3.1
psql (PostgreSQL) 9.3.12
PHP 5.5.9-1ubuntu4.16 (cli) (built: Apr 20 2016 14:31:27)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
Server version: Apache/2.4.7 (Ubuntu)
Server built: Jan 14 2016 17:45:23
With the following config... the errors like the one further below appear...
When I try to sync 5 contacts, only one is stored to server... the others
are not...
Wood config:
AWL version 0.56
Davical version 1.1.4
psql (PostgreSQL) 9.1.21
contains support for command-line editing
PHP 5.3.10-1ubuntu3.22 with Suhosin-Patch (cli) (built: Apr 20 2016
12:31:15)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Server version: Apache/2.2.22 (Ubuntu)
Server built: Jul 24 2015 17:25:42
Postgres error:
"2016-05-04 07:42:19 BST ERROR: deadlock detected
2016-05-04 07:42:19 BST DETAIL: Process 6162 waits for ShareLock on
transaction 192145; blocked by process 6164.
Process 6164 waits for ExclusiveLock on tuple (1,27) of relation
17248 of database 17112; blocked by process 6162.
Process 6162: INSERT INTO caldav_data ( user_no, dav_name,
dav_etag,
caldav_data, caldav_type, logged_user, created, modified,
collection_id )
VALUES( 1006,
'/richard/addresses/ac2fee95-ef58-451d-ae1d-58c3f6eca1b6.vcf',
'61413f34312ce41687ee8e4fc1a22c1f', E'BEGIN\x3aVCARD
(...)
"
That sounds likes there are 2 Apache processes (6162 and 6164) both trying
to access the same table ("caldav_data"). Process 6164 is waiting for
process 6162 to finish.
Issue raise with both PUT and DELETE commands...
No error reported on client during PUT sync...
HTTP 500 error reported on client which stop to sync during DELETE...
As in the first config case the issue does not raise, we believe it might
be fixable in Davical...
A short term fix we are trying is limiting the Apache connections for
Davical to only one per IP address (simplest but
not best solution), a Davical implemented solution may be best...
Any advice how to sort this issue?
I am encountering similar database deadlock issue as Egoitz described and
try to fix (here https://sourceforge.net/p/davical/mailman/message/34986381/
and here https://sourceforge.net/p/davical/mailman/message/35006191/) with
Postgres on Linux.
For testing with client, I used various version of Contacts.app on Mac OS X
10.9, 10.10, 10.11...
With the following config, no issue...
When I try to sync 5 contacts, five are effectively stored to the server...
the others are not...
Srl config:
AWL version 0.55
Davical version 1.1.3.1
psql (PostgreSQL) 9.3.12
PHP 5.5.9-1ubuntu4.16 (cli) (built: Apr 20 2016 14:31:27)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
Server version: Apache/2.4.7 (Ubuntu)
Server built: Jan 14 2016 17:45:23
With the following config... the errors like the one further below appear...
When I try to sync 5 contacts, only one is stored to server... the others
are not...
Wood config:
AWL version 0.56
Davical version 1.1.4
psql (PostgreSQL) 9.1.21
contains support for command-line editing
PHP 5.3.10-1ubuntu3.22 with Suhosin-Patch (cli) (built: Apr 20 2016
12:31:15)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
Server version: Apache/2.2.22 (Ubuntu)
Server built: Jul 24 2015 17:25:42
Postgres error:
"2016-05-04 07:42:19 BST ERROR: deadlock detected
2016-05-04 07:42:19 BST DETAIL: Process 6162 waits for ShareLock on
transaction 192145; blocked by process 6164.
Process 6164 waits for ExclusiveLock on tuple (1,27) of relation
17248 of database 17112; blocked by process 6162.
Process 6162: INSERT INTO caldav_data ( user_no, dav_name,
dav_etag,
caldav_data, caldav_type, logged_user, created, modified,
collection_id )
VALUES( 1006,
'/richard/addresses/ac2fee95-ef58-451d-ae1d-58c3f6eca1b6.vcf',
'61413f34312ce41687ee8e4fc1a22c1f', E'BEGIN\x3aVCARD
(...)
"
That sounds likes there are 2 Apache processes (6162 and 6164) both trying
to access the same table ("caldav_data"). Process 6164 is waiting for
process 6162 to finish.
Issue raise with both PUT and DELETE commands...
No error reported on client during PUT sync...
HTTP 500 error reported on client which stop to sync during DELETE...
As in the first config case the issue does not raise, we believe it might
be fixable in Davical...
A short term fix we are trying is limiting the Apache connections for
Davical to only one per IP address (simplest but
not best solution), a Davical implemented solution may be best...
Any advice how to sort this issue?