View Issue Details

IDProjectCategoryView StatusLast Update
0003120SOGoActiveSyncpublic2015-05-12 14:46
ReporterSigurd Holter Assigned Toludovic  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionsuspended 
Platform[Server] LinuxOSRHEL/CentOSOS Version7
Product Version2.2.16 
Summary0003120: Memory leak ?
Description

In contrast with earlier versions, it seems SOGO 2.2.16 threads don't release (all) memory after responding to a request.
On our server, there are now several (mostly idle) processes consuming 2+GB each.
After some time, this causes the server to slow down, forcing a SOGO restart.
This problem has increased as more of our users start usin ActiveSync, so I believe it is related to that.

TagsNo tags attached.

Activities

Sigurd Holter

Sigurd Holter

2015-03-11 12:55

reporter   ~0008261

This is still going on - we just had 20 workers consuming 2.5GB each. It seems to be due to an initial ActiveSync from a user who had an empty inbox on opening Outlook.

ludovic

ludovic

2015-03-18 14:22

reporter   ~0008299

Show your complete sogo.conf file.

You should NOT set SxVMemLimit to a high value if you have many workers.

What you see is the "normal" memory usage behaviour with autorelease pools in GNUstep.

Sigurd Holter

Sigurd Holter

2015-03-18 14:59

reporter   ~0008303

{
OCSFolderInfoURL = "mysql://xxx:xxx@server:3306/sogo/sogo_folder_info";
SOGoProfileURL = "mysql://xxx:xxx@server:3306/sogo/sogo_user_profile";
OCSSessionsFolderURL = "mysql://xxx:xxx@server:3306/sogo/sogo_sessions_folder";

SOGoMaximumPingInterval = 10;
SOGoInternalSyncInterval = 10;

SOGoEnablePublicAccess = YES;

SOGoEnableEMailAlarms = YES;
OCSEMailAlarmsFolderURL = "mysql://xxx:xxx@server:3306/sogo/sogo_alarms_folder";

SOGoMailAuxiliaryUserAccountsEnabled = YES;

SOGoMaximumSyncWindowSize = 10;

SOGoSieveServer = "sieve://server:4190/?tls=YES";

SOGoMailingMechanism = smtp;
SOGoSMTPServer = server;

WOPort = "server2:20000";

SOGoIMAPServer = "imaps://server/?tls=YES";

SOGoMailDomain = domain.no;

SOGoMailMessageCheck = every_minute;

SOGoSMTPAuthenticationType = PLAIN;

SOGoForceExternalLoginWithEmail = YES;

SOGoUserSources = (
{
type = ldap;
CNFieldName = cn;
IDFieldName = cn;
UIDFieldName = userPrincipalName;

IMAPHostFieldName = mailHost;

baseDN = "CN=Users,DC=domain,DC=no";
bindDN = "CN=xxx,CN=Users,DC=domain,DC=no";
bindFields = (sAMAccountName,userPrincipalName);

MailFieldNames = (userPrincipalName);

bindPassword = xxx;
canAuthenticate = YES;
displayName = "Active Directory";
hostname = terminalserver.domain.no;
id = directory;
isAddressBook = YES;
port = 389;
mapping = {
mail = userPrincipalName;
};
}
);
SOGoVacationEnabled = YES;
SOGoForwardEnabled = YES;
SOGoSieveScriptsEnabled = YES;
SOGoMailUseOutlookStyleReplies = YES;
SOGoFirstDayOfWeek = 1;
SOGoLanguage = NorwegianBokmal;
SOGoTimeZone = Europe/Oslo;
SxVMemLimit = 8192;
SOGoMemcachedHost = 127.0.0.1;
SOGoDebugRequests = YES;
SOGoMaximumSyncResponseSize = 10240;
WOWorkersCount = 20;
WOWatchDogRequestTimeout = 120;
}

Sigurd Holter

Sigurd Holter

2015-03-18 14:59

reporter   ~0008304

So how then can we make sure the initial sync works ?

If SxVMemLimit is set too low, the thread exits before the initial sync is done, and no mail is found by Outlook 2013.

ludovic

ludovic

2015-03-18 15:01

reporter   ~0008305

That's not true.

SxVMemLimit is looked by the SOGo process AFTER the response was delivered. If the current memory usage of the process exceeds SxVMemLimit, it'll terminate itself and the parent process would spawn a new child.

In any case, the response WAS SENT before this.

Sigurd Holter

Sigurd Holter

2015-03-18 15:05

reporter   ~0008306

Ok, so we can set SxVMemLimit to 1GB, the response will be delivered however large it is - and the process will restart afterwards ?
Is this only for initial sync, or for all requests ?
What are the implications of setting SxVMemLimit too low ?

ludovic

ludovic

2015-03-18 15:16

reporter   ~0008307

To answer your questions:

Yes
For all requests
Process will restart too often

Sigurd Holter

Sigurd Holter

2015-03-18 15:21

reporter   ~0008308

Ok, thanks, will lower it now and see how it goes.

Issue History

Date Modified Username Field Change
2015-03-05 15:00 Sigurd Holter New Issue
2015-03-11 12:55 Sigurd Holter Note Added: 0008261
2015-03-18 14:22 ludovic Note Added: 0008299
2015-03-18 14:22 ludovic Severity major => minor
2015-03-18 14:59 Sigurd Holter Note Added: 0008303
2015-03-18 14:59 Sigurd Holter Note Added: 0008304
2015-03-18 15:01 ludovic Note Added: 0008305
2015-03-18 15:05 Sigurd Holter Note Added: 0008306
2015-03-18 15:16 ludovic Note Added: 0008307
2015-03-18 15:21 Sigurd Holter Note Added: 0008308
2015-05-12 14:46 ludovic Status new => resolved
2015-05-12 14:46 ludovic Resolution open => suspended
2015-05-12 14:46 ludovic Assigned To => ludovic