View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003236 | SOGo | ActiveSync | public | 2015-06-06 14:29 | 2015-10-14 19:34 |
Reporter | JoelSteiner | Assigned To | ludovic | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | suspended | ||
Platform | [Server] Linux | OS | Ubuntu | OS Version | 14.04 LTS |
Product Version | 2.3.0 | ||||
Summary | 0003236: ActiveSync fails to sync large mailboxes with Outlook 2013 | ||||
Description | New install of iRedmail with SOGo. Ubuntu 14.04, Nginx as web server, PostgreSQL backend. Large mailboxes fail to synchronize with Outlook. sogo.log fills with content like this while Outlook is open: 2015-06-05 16:05:40.859 sogod[1958] MimeType 'text/' does not support a parameter named 'boundary' with value '----56b50a46c4e83c7b064b7459d42e9b3d' And /var/log/syslog shows this occasionally: Jun 5 16:04:31 mail kernel: [ 8701.098496] Out of memory: Kill process 2707 (sogod) score 476 or sacrifice child | ||||
Steps To Reproduce | Copy thousands of messages into a mail account using IMAP (can't copy in while connected with EAS in Outlook). Then add an EAS account in Outlook and watch it try to sync messages. | ||||
Additional Information | Copying from my post on iRedmail forum:
I freshly installed iRedmail yesterday. Version and OS info, etc. are above. My goal is to provide EAS services to Outlook 2013 and BlackBerry 10 users. All went well during install, and a test account worked OK -- mail came through on my BlackBerry, calendar and contact sync worked. Wonderful! I proceeded to add an EAS account in Outlook 2013 and tried to copy old mail into it. No go, thanks to an Outlook limitation that does not allow you to copy mail into an EAS account. OK, so I set up the account via IMAP and copied mail in that way. The task took hours to complete, but once done I deleted that account and re-created it using Exchange ActiveSync protocol... and ran smack into problems. It seems that the config out of the box can handle very small mailboxes, but I just can not get this large mail account (around 4GB) to sync. There is not much in the Inbox but there are lots of other folders; some of them have as many as 5,000 messages apiece. I expected sync to take some time but it just doesn't happen at all. Not even if you leave Outlook open for several hours. The folders sync immediately -- they all show up -- but no mail appears in them. Outlook displays the message "Waiting for Server Response" for quite a while. It may then say "folder last updated at <certain time>", but still no mail in the folder. If I then click on another folder, Outlook soon displays an exclamation point and says "Disconnected." If I connect via BlackBerry 10, it all works perfectly fine. It's just Outlook that refuses to work, and fills the logs with that MimeType blather. | ||||
Tags | No tags attached. | ||||
The "MimeType" errors keep spewing into the log, until it finally stops with this. Seems Sogo crashes and re-starts. Jun 06 13:31:51 sogod [1953]: |SOGo| terminating app, vMem size limit (384 MB) has been reached (currently 425 MB) Jun 06 13:32:56 sogod [8330]: <0x0x7fc10546b288[SOGoCache]> Cache cleanup interval set every 300.000000 seconds And if this helps, here's the sogo.log from opening and closing Outlook 2013, syncing a very small test mailbox (about half a dozen messages). This small box syncs fine but there are still errors in the log... see below. (I replaced the email address with a bogus one.) Jun 06 13:36:14 sogod [8330]: localhost "OPTIONS /SOGo/Microsoft-Server-ActiveSync HTTP/1.0" 200 0/0 0.052 - - 80K |
|
Reproduced today with another fresh install on Ubuntu Server 14.04. Selected Apache instead of Nginx, just for "anyhow." Precisely the same behavior -- Outlook 2013 can not sync large mail folders. Same kinds of error messages. Repro yourself and get the logs you need. |
|
I myself discovered same problem, when I had duplicate emails in folders. For example same message was in inbox folder and in folder called "inbox_backup". Outlook downloaded first 5 messages and then same behaviour as yours. Deleted the backup folder and then Outlook donwloaded all messages like it should. |
|
Thanks, Raido. But note that sync works just fine on a BlackBerry 10 smartphone, no problems at all. Very little log activity; just notices of "pushing new content" etc. None of that "filling the log with thousands of lines of errors" thing. I know there are some duplicate messages, but I sure hope I don't have to find them all. And, this thing doesn't even download ONE message. It just refuses to start downloading at all. If BB10 can talk to Sogo perfectly fine and Outlook can't... well for one thing maybe BlackBerry got it better than Microsoft! :) but there must be some changes needed in Sogo to handle Outlook better. |
|
From the logs above, SOGo does NOT crash, it terminates itself (child process) as it should when reaching its memory limit. It does so after sending the response, so it's harmless. What are the EAS related settings in your sogo.conf file? |
|
There's this: WOWorkersCount = 1; That's all I can find EAS-related, other than the commented-out debug line: //SOGoEASDebugEnabled = YES; |
|
Read the documentation: http://www.sogo.nu/files/docs/SOGo%20Installation%20Guide.pdf "Microsoft EnterpriseActiveSync Tuning" |
|
Thanks, but I don't have success even by adding parameters as shown in that section. I am beginning to wonder, does Apache handle Activesync better than Nginx? Or are there nginx settings I should be aware of? The docs are helpful with apache reverse proxying but totally silent on nginx... |
|
You could try to recreate the eas profile in outlook with SOGoMaximumSyncResponseSize=512. |
|
This landed up being the most successful for us, we still have issues with mailboxes over 3GB. Your dovecot needs the word size increased to 4096 SOGoMaximumSyncResponseSize= 2048 SOGoMaximumPingInterval and SOGoInternalSyncInterval need to be identical and less than SOGoMaximumSyncInterval .. ie 60seconds Try using SOGoMaximumSyncWindowSize of 30 Set the memory limit to 1024mb and make sure your server has enough ram for the woworkercount.. ie ram / 768 = worker count ;-P The ideal way to use sogo, is to have it completely standalone from the iredmail server.Currently there are still issues with not all folders syncing.. ie out of 100 folders 20 will be empty. There is also an issue, appearing in the logs. Jul 02 22:45:18 sogod [898]: 196.210.12.184 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=xxx@xxx.com&DeviceId=63B2B7D43DB7493C881133FA01F02A0B&DeviceType=WindowsOutlook15 HTTP/1.1" 200 4120446/13297 42.023 - - 73M Not sure if thats caused by nginx, or a buffer not being filled/used via the proxied request. |
|
Well I have tried replying to this several times. Test, test! can I post??? |
|
"The ideal way to use sogo, is to have it completely standalone from the iredmail server." Care to elaborate a bit more what you mean? Also, by dovecot word size, are you referring to mail_max_keyword_length in 10-mail.conf? Currently, sogo.conf has this:
Outlook has downloaded hundreds of emails, but hundreds remain to go and it cheerfully reports "All folders are up to date." I'm also getting a lot of this in sogo.log: Aug 01 16:41:47 sogod [8771]: [WARN] <0x0x7fa46c68aa18[WOWatchDogChild]> pid 8776 has been hanging in the same request for 7 minutes Any further suggestions? Version: 2.3.1-1 |
|
Just a small update. I changed SOGoMaximumSyncResponseSize = 1024; to SOGoMaximumSyncResponseSize = 4096; Inspiration to change this param came from this part of the docs: "Note that if you set the value too low and a mail message or any other object surpasses it, it will still be synced, but only this item will be." Now that's just a wee bit cryptic. Suppose I have emails with attachments greater than 4MB; am I going to have to bump this setting even higher? Anyhow, that got Outlook downloading messages again (at least, it seems that's what did it). It's still working at it. I'll leave it open for a couple hours and see what happens. Every once in a while Outlook says All folders are up to date; then after a bit it buckles down and downloads some more. The cycle is, "Waiting for server response... Downloading from server... Updating (folder name)... All folders are up to date... (wait a while) Waiting for server response..." and so on it repeats. But as I said, it seems to be downloading, and sync between sogo and outlook seems to be working nicely. And the "hanging in same request" error does not seem to be running as wild, for some reason. I've not seen more than 4 minutes yet; before, it ran up to 47 minutes and beyond. |
|
Well, though this is working better than I've ever seen before I still have some empty folders. And with that being the case, I don't know how reasonably sure I can be that all folders updated completely. Outlook refuses to download more, or else Sogo EAS fails to realize it has not synced them all. |
|
Just to clarify the settings SOGoMaximumSyncResponseSize and SOGoMaximumSyncWindowSize. They are used to restrict the size of one single sync response. You have two settings, because they restrict two different aspects of the sync. SOGoMaximumSyncResponseSize defines how big one sync response should get at max. So when you set SOGoMaximumSyncResponseSize to a really low value, you will sync each email on its own, which will take really long on big accounts. |
|
Dear Christian, ludovic, Any update on this issue? We experienced the same issue, it syncs mail folders, but no email. |
|
After hours of fiddling, I seem to have (accidentally?) discovered settings that work. Here's my current ActiveSync section of sogo.conf: WOWatchDogRequestTimeout = 10; And in nginx.conf: keepalive_timout 600; And, /etc/dovecot/conf.d/10-imap.conf: mail_max_keyword_length = 4096 One more. /etc/dovecot/dovecot.conf: imap_max_line_length = 4M This last param in dovecot.conf was added; it was not there to begin with. Just be sure to put it within the {imap} section. In my case, I inserted it right under the "mail_max_user_ip_connections" line. (Note that you still need to be sure you're in the right place, as the {pop} protocol section has an identical line.) Now, just a word on web server and WOWatchDogRequest timeouts. The Sogo docs recommend setting these to an hour. I tried that, and simply could not get enough Sogo workers to satisfy the Outlook clients. And wow did it hog RAM. We finally gave this mail server 10GB of RAM and experimentally specified more and more workers... I think I got as high as PREFORK = 35 in /etc/default/sogo. It happily filled the RAM in a day or two. And the mail clients kept disconnecting from the server, mails disappeard and reappeared at random from various folders, and so on. Seemingly we were bringing the server to its knees with just two or three activesync clients! The Sogo log indicated "No child available to handle incoming request." With such a small number of ActiveSync clients (the rest IMAP), I thought this was crazy. After setting files as shown above, the client reports that his Outlook workstations are staying in sync -- and staying connected. He's not seeing the "disconnected from server" error any more. (Thank God I have a very patient client!) Also the server isn't running away with RAM any longer. As I am writing this, I'm watching htop on the server. We're sitting at just a wee bit less than 2GB of RAM used, and 64MB of swap. Still 8GB of RAM free! CPU usage certainly is higher when using ActiveSync; it keeps periodically jumping as high as 12 or 13% on either core, then settling back to near zero. This cycle repeats every couple seconds. So to summarize. I am not sure why I'm having such good luck with 10 minute timeout rather than 60 minutes as indicated in the official docs. But I'm very happy to finally have a client who has a functional mail server. @Christian Mack, thanks so much for your very insightful clarification of the Response and Sync params. That was very helpful. @zhb, give these settings a shot and report back whether or not it works for you. I'd be interested to know how others make out. And any improvements to config are always welcome. |
|
Please try again with the upcoming nightly builds. We've added a good amount of optimizations for Outlook which should increase speed and greatly reduce memory usage. It'll be all part of v2.3.3. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2015-06-06 14:29 | JoelSteiner | New Issue | |
2015-06-06 17:42 | JoelSteiner | Note Added: 0008589 | |
2015-06-07 01:36 | JoelSteiner | Note Added: 0008590 | |
2015-06-08 07:03 | Raido | Note Added: 0008591 | |
2015-06-08 12:41 | JoelSteiner | Note Added: 0008595 | |
2015-06-08 12:43 | ludovic | Note Added: 0008596 | |
2015-06-08 12:43 | ludovic | Severity | major => minor |
2015-06-08 12:54 | JoelSteiner | Note Added: 0008597 | |
2015-06-08 12:56 | ludovic | Note Added: 0008598 | |
2015-06-10 13:06 | JoelSteiner | Note Added: 0008611 | |
2015-06-24 19:54 | tfu | Note Added: 0008672 | |
2015-07-02 10:03 | extremeshok | Note Added: 0008687 | |
2015-07-02 10:08 | extremeshok | Note Edited: 0008687 | |
2015-07-02 11:34 | extremeshok | Note Edited: 0008687 | |
2015-07-02 22:55 | extremeshok | Note Edited: 0008687 | |
2015-08-01 20:38 | JoelSteiner | Note Added: 0008792 | |
2015-08-01 20:42 | JoelSteiner | Note Added: 0008793 | |
2015-08-01 21:07 | JoelSteiner | Note Added: 0008794 | |
2015-08-01 21:20 | JoelSteiner | Note Added: 0008795 | |
2015-08-03 08:24 | Christian Mack | Note Added: 0008798 | |
2015-08-16 00:17 | zhb | Note Added: 0008823 | |
2015-09-02 23:11 | JoelSteiner | Note Added: 0008886 | |
2015-09-02 23:14 | JoelSteiner | Note Edited: 0008886 | |
2015-10-14 19:34 | ludovic | Note Added: 0009000 | |
2015-10-14 19:34 | ludovic | Status | new => closed |
2015-10-14 19:34 | ludovic | Assigned To | => ludovic |
2015-10-14 19:34 | ludovic | Resolution | open => suspended |