View Issue Details

IDProjectCategoryView StatusLast Update
0006131SOGoBackend Calendarpublic2025-06-19 10:47
Reportervbonamy Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platform[Server] LinuxOSUbuntuOS Version16.04 LTS
Product Version5.12.1 
Summary0006131: Performance degradation when displaying calendar events with email alarms enabled due to malformed or orphaned recurring event
Description

We have encountered a significant performance issue in SOGo when displaying calendars that include certain events. Specifically, when SOGoEnableEMailAlarms is set to YES, SOGo issues repeated SQL DELETE queries such as:

DELETE FROM sogo_alarms_folder WHERE c_path='NULL' AND c_name='NULL';
or:
DELETE FROM sogo_alarms_folder WHERE c_path='NULL' AND c_name='4C39-627DFA80-15-2FEA38C0.ics';

These queries are triggered once per problematic event and drastically impact performance. For example, loading a full month view can take up to 2 seconds compared to 0.2 seconds when the issue is not present.

Disabling email alarms globally with:
SOGoEnableEMailAlarms = NO;
fully eliminates the performance issue.

We analyzed a minimal .ics file (attached) extracted from a real production calendar. It contains only one event, yet consistently triggers the problematic SQL queries when imported into the latest version of SOGo.

This event includes a RECURRENCE-ID:
RECURRENCE-ID:20250628T063000Z
but no corresponding parent recurring event is defined.

Steps To Reproduce

Ensure SOGoEnableEMailAlarms = YES; in your configuration.

Import the attached .ics file (pb-sogo.ics) into any calendar.

View the calendar (refresh it)

Observe the SQL DELETE query in logs (MySQL4DebugEnabled = YES) :
<MySQL4Channel[0x0x56111ae7b2e0] connection=0x0x56111b0fa390> SQL: DELETE FROM sogo_alarms_folder WHERE c_path='NULL' AND c_name='4C39-627DFA80-15-2FEA38C0.ics';

Set SOGoEnableEMailAlarms = NO; and repeat step 3 to verify the absence of the DELETE query.

TagsNo tags attached.

Activities

vbonamy

vbonamy

2025-06-19 10:47

reporter  

pb-sogo.ics (1,032 bytes)   
BEGIN:VCALENDAR
PRODID:-//Inverse inc./SOGo 5.12.1//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Europe/Paris
LAST-MODIFIED:20250324T091428Z
X-LIC-LOCATION:Europe/Paris
BEGIN:DAYLIGHT
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:4C39-627DFA80-15-2FEA38C0
SUMMARY:Test Evt Sogo Alarm Issue
CLASS:PUBLIC
TRANSP:TRANSPARENT
DTSTART;TZID=Europe/Paris:20250628T083000
DTEND;TZID=Europe/Paris:20250628T093000
CREATED:20250624T063559Z
DTSTAMP:20250624T063559Z
LAST-MODIFIED:20250624T063559Z
SEQUENCE:1
RECURRENCE-ID:20250628T063000Z
BEGIN:VALARM
TRIGGER;VALUE=DURATION;RELATED=START:-P1W
ACTION:EMAIL
ATTENDEE;CN=SOGo:mailto:sogo@example.org
SUMMARY:Test Evt Sogo Alarm Issue
END:VALARM
END:VEVENT
X-WR-CALNAME:Agenda personnel
END:VCALENDAR
pb-sogo.ics (1,032 bytes)   

Issue History

Date Modified Username Field Change
2025-06-19 10:47 vbonamy New Issue
2025-06-19 10:47 vbonamy File Added: pb-sogo.ics