View Issue Details

IDProjectCategoryView StatusLast Update
0003988SOGoBackend Calendarpublic2017-06-28 15:02
ReporterMarcel Assigned Tofrancis  
PrioritynormalSeverityminorReproducibilityrandom
Status resolvedResolutionfixed 
Platform[Server] LinuxOSUbuntuOS Version14.04 LTS
Product Versionnightly master 
Fixed in Version3.2.10 
Summary0003988: Subscription to calendars deleted when database is unreachable
Description

The Postgres database server storing the SOGo databases was overloaded (due to some other processes).

When a user with incoming shared calendars would try to CalDAV sync a calendar, if the database was unavailable at that time, it would delete the subscription to that calendar (if the database was reachable again for the deletion).

In the end, after some time of syncing and some time of heavily loaded database server, about half of the dozen+ subscriptions of one user had disappeared.

Steps To Reproduce

Load your database server heavily.

Sync from a CalDAV client (Evolution, in this case, but I doubt it makes a difference).

Enjoy the disappearing subscriptions.

Additional Information

I assume if the query for the calendar fails, the result is the same for "calendar not found" and "could not connect to the database". The wrapping code does the processing for "calendar not found" (i.e., delete the subscription), even if the result was "could not connect to the database".

TagsNo tags attached.

Relationships

has duplicate 0004187 resolvedludovic SubscribedFolders overritten 

Activities

hkunz

hkunz

2017-03-15 15:55

reporter   ~0011494

I can confirm this (debian jessie).

After a postgres update (and an involved stopping/starting of the database) we "randomly" lost calendar subscriptions. I was puzzled until I found this bug report, which perfectly explains what happened.

I think this bug should be marked as (very) important, because (configuration) data is lost.

robert.k

robert.k

2017-03-16 07:10

reporter   ~0011497

we have something similar with Debian Jessie and Outlook 2013 with EAS
Subscriptions of calendar are lost.

The reason for connection lost was to many sql connections were opened so there was no more connection to database possible.

The only way to fix this was to create a new outlook Profile.

In Thunderbird we didn't noticed that until now.

robert.k

robert.k

2017-03-20 07:44

reporter   ~0011535

Last edited: 2017-03-20 09:14

We had an delete of subcribed calendars in SOGoWeb too.

Our Problem are too many database connections (see bug https://sogo.nu/bugs/view.php?id=4083) so we have the delete more then one time at a user..

Mathias Roland

Mathias Roland

2017-03-22 08:51

reporter   ~0011548

I can confirm this problem too.

The connection to the database server was lost due to a database server restart. After this one or more calendar subscriptions were lost by all users who tried to access the web calendar in the outage time.

alaniyatm

alaniyatm

2017-03-23 09:09

reporter   ~0011561

I can confirm this problem too.
Thunderbird with SOGo plugins disables calendars when DB is out of service.

For us this issue is wery important - 15k users are affected time to time...

francis

francis

2017-05-03 15:47

administrator   ~0011785

Is this problem only observed with a PostgreSQL database?

robert.k

robert.k

2017-05-04 05:26

reporter   ~0011786

We have the problem also and we have an mysql DB MySQL 5.5.54

ludovic

ludovic

2017-05-08 14:31

administrator   ~0011790

I've tried to reproduce it with no luck on MySQL.

realynot

realynot

2017-06-19 09:53

reporter   ~0011988

Last edited: 2017-06-20 13:23

Same problem with postgres 9.3, is very important for us to.
i tried to up max connection on postgres, but same problem...

edit : upload error file

realynot

realynot

2017-06-20 13:23

reporter  

erreur-sogo.png (7,803 bytes)   
erreur-sogo.png (7,803 bytes)   
ludovic

ludovic

2017-06-20 13:42

administrator   ~0011994

I need to have a reproducible way to duplicate the problem here.

We did extensive testing and never been able to trigger it.

realynot

realynot

2017-06-22 08:32

reporter   ~0011997

At the moment we detect the loss of calendars with the command
tail -f sogo.log | grep PROPFIND | grep 404 | grep Calendar

And when calendar are lost :

Jun 22 07:38:18 sogod [6983]: 127.0.0.1 "PROPFIND /SOGo/dav/delxxx/Calendar/valxxx_3C8D-5790D500-D-6867F280/ HTTP/1.0" 404 87/394 0.010 - - 0
Jun 22 07:49:03 sogod [7003]: 127.0.0.1 "PROPFIND /SOGo/dav/delxxx/Calendar/valxxx_3C8D-5790D500-D-6867F280/ HTTP/1.0" 404 87/394 0.009 - - 0
Jun 22 08:04:11 sogod [7008]: 127.0.0.1 "PROPFIND /SOGo/dav/delxxx/Calendar/valxxx_3C8D-5790D500-D-6867F280/ HTTP/1.0" 404 87/394 0.009 - - 0
Jun 22 08:19:09 sogod [6989]: 127.0.0.1 "PROPFIND /SOGo/dav/delxxx/Calendar/valxxx_3C8D-5790D500-D-6867F280/ HTTP/1.0" 404 87/394 0.008 - - 0
Jun 22 09:55:18 sogod [6997]: 127.0.0.1 "PROPFIND /SOGo/dav/farxxx/Calendar/desxxx_personal/ HTTP/1

How can you help you see more clearly?

I will try to reinstall a full server with postgresql 9.6 instead of 9.3 ... no?

infrasysteme

infrasysteme

2017-06-22 09:55

reporter   ~0011998

Hi,

we have the same problem here since the last version of SOGo v2 (2.3.21).
For us, we didn't have this issue with the 2.3.20 (i will confirm that because we are actually downgrading SOGo to 2.3.20).
We use postgreSQL 9.3 and we will try to upgrade to postgresql 9.6.

Also, we have the same logs that realynot when calendar are lost.

thanks for your help,

ludovic

ludovic

2017-06-22 12:27

administrator   ~0012000

Well if a PROPFIND returns a 404, that means the resource is gone from SOGo's point of view. there must be a reason why we say so if in fact, it isn't.

hkunz

hkunz

2017-06-22 13:08

reporter   ~0012001

This is just a wild guess.
We are seeing this problem since this bug has been fixed:
https://sogo.nu/bugs/view.php?id=4010

although this could also just be a coincidence.

Best,
Hp

ludovic

ludovic

2017-06-22 14:22

administrator   ~0012002

I've pushed a tentative fix, try it.

realynot

realynot

2017-06-28 08:45

reporter   ~0012011

Last edited: 2017-06-28 08:51

same problem with the fix :(

More and more users calendars are affected

We just tried a new installation with sogo 2.3.21, PGSQL 9.6 & nginx 1.12 ... and import of our database .. problem : POPUP : Avertissement: An error occured while loading... but the calendars don't disappears
We are going to try a downgrade 2.3.20, this problem impacted the directors it is very embarrassing.

ludovic

ludovic

2017-06-28 10:43

administrator   ~0012012

If the problem isn't in 2.3.20 but is in 2.3.21, it should be fairly simple to identify. We'll check today.

ludovic

ludovic

2017-06-28 13:15

administrator   ~0012013

We are able to reproduce the issue. A fix is coming up.

realynot

realynot

2017-06-28 13:49

reporter   ~0012014

good news

Related Changesets

sogo: master 7f00afce

2017-06-22 10:20

ludovic


Details Diff
(fix) check cache before using it (fixes 0003988) Affected Issues
0003988
mod - SoObjects/SOGo/SOGoGCSFolder.m Diff File

sogo: v2 a30efc6c

2017-06-22 10:20

ludovic


Details Diff
(fix) check cache before using it (fixes 0003988) Affected Issues
0003988
mod - SoObjects/SOGo/SOGoGCSFolder.m Diff File

sogo: master 863510e7

2017-06-28 10:57

francis


Details Diff
(fix) Update settings of active user only

Fixes 0003988
Affected Issues
0003988
mod - SoObjects/SOGo/SOGoParentFolder.m Diff File

sogo: v2 a7d07b2a

2017-06-28 10:57

francis


Details Diff
(fix) Update settings of active user only

Fixes 0003988
Affected Issues
0003988
mod - SoObjects/SOGo/SOGoParentFolder.m Diff File

Issue History

Date Modified Username Field Change
2017-01-10 13:43 Marcel New Issue
2017-03-15 15:55 hkunz Note Added: 0011494
2017-03-16 07:10 robert.k Note Added: 0011497
2017-03-20 07:44 robert.k Note Added: 0011535
2017-03-20 08:53 robert.k Note Edited: 0011535
2017-03-20 09:14 robert.k Note Edited: 0011535
2017-03-22 08:51 Mathias Roland Note Added: 0011548
2017-03-23 09:09 alaniyatm Note Added: 0011561
2017-05-03 15:47 francis Note Added: 0011785
2017-05-04 05:26 robert.k Note Added: 0011786
2017-05-08 14:31 ludovic Note Added: 0011790
2017-06-19 09:53 realynot Note Added: 0011988
2017-06-20 13:23 realynot File Added: erreur-sogo.png
2017-06-20 13:23 realynot Note Edited: 0011988
2017-06-20 13:42 ludovic Note Added: 0011994
2017-06-22 08:32 realynot Note Added: 0011997
2017-06-22 09:55 infrasysteme Note Added: 0011998
2017-06-22 12:27 ludovic Note Added: 0012000
2017-06-22 13:08 hkunz Note Added: 0012001
2017-06-22 14:22 ludovic Changeset attached => sogo master 7f00afce
2017-06-22 14:22 ludovic Assigned To => ludovic
2017-06-22 14:22 ludovic Resolution open => fixed
2017-06-22 14:22 ludovic Changeset attached => sogo v2 a30efc6c
2017-06-22 14:22 ludovic Note Added: 0012002
2017-06-28 08:45 realynot Note Added: 0012011
2017-06-28 08:46 realynot Note Edited: 0012011
2017-06-28 08:51 realynot Note Edited: 0012011
2017-06-28 10:43 ludovic Note Added: 0012012
2017-06-28 13:15 ludovic Note Added: 0012013
2017-06-28 13:49 realynot Note Added: 0012014
2017-06-28 14:58 francis Changeset attached => sogo master 863510e7
2017-06-28 14:58 francis Assigned To ludovic => francis
2017-06-28 15:00 ludovic Relationship added has duplicate 0004187
2017-06-28 15:01 francis Status new => resolved
2017-06-28 15:01 francis Fixed in Version => 3.2.10
2017-06-28 15:02 francis Changeset attached => sogo v2 a7d07b2a