Upgrade to 7.06 - Memory Leak in MEMTA.exe

Discussion forum for Enterprise Edition.
Post Reply
mc9ag
Posts: 10
Joined: Sat Sep 29, 2012 9:32 am

Upgrade to 7.06 - Memory Leak in MEMTA.exe

Post by mc9ag »

A recent upgrade from version 6 to 7.06 Enterprise edition has caused MEMTA.exe to gradually consume more and more memory. Where it used to use less than 80Mb, it now gains about 40Mb/day and seems to have no limit. Restarting the service resets memory used to minimal, then it begins incrementing again.

We use latest version of MXSCAN (with Clam AV) and ME (with F-prot antivirus, although I have tried disabling this). We don't use spamassassin. We filter within ME against blacklists. There are no obvious errors I can see in the MTA logs or Windows logs. Memory usage continues to grow on disabling MXScan.

We've had no other problems in an otherwise seamless upgrade.

The forum's upload feature isn't working so can't attach a screenshot, however task manager shows MEMTA.exe's memory usage gone up from 180Mb yesterday to 231Mb. Will be at 300Mb later today then the sky's the limit!

rfwilliams777
Posts: 1370
Joined: Thu Nov 11, 2004 5:26 pm
Location: Kingsville, Texas

Re: Upgrade to 7.06 - Memory Leak in MEMTA.exe

Post by rfwilliams777 »

How many messages go through your server inbound and outbound average a day? Do you have MXScan first and then MTA or is it the other way around? What is your thread size or limit set in MTA and MXScan?
Robert Williams, Owner
www.WilliamsWebSolutions.com
#1 in MailEnable Business-Class Email Hosting - Switch to Williams Web Solutions and we will migrate your accounts to us for FREE!
We can be hired to help you with your Mail Enable server, too!

mc9ag
Posts: 10
Joined: Sat Sep 29, 2012 9:32 am

Re: Upgrade to 7.06 - Memory Leak in MEMTA.exe

Post by mc9ag »

We send around 900 and receive around 10,000
For MXScan the max concurrent threads is 3. For ME the MTA Maximum threads is 5.

I believe ME handles mail first, here's the MTA settings:
- 'enable pickup event' is checked with program "C:\Program Files (x86)\MxUptime\MxScanME\MxScanME.exe"
- 'Process pickup after filters instead of before" - unchecked
- Logging settings are both checked
I don't use archiving.

MEMTA.exe has now reached 300Mb and is climbing.

rfwilliams777
Posts: 1370
Joined: Thu Nov 11, 2004 5:26 pm
Location: Kingsville, Texas

Re: Upgrade to 7.06 - Memory Leak in MEMTA.exe

Post by rfwilliams777 »

How much RAM do you have on the server? I never thought that this was too much of an issue, but I have seen drastic difference of 2 GB of RAM to 4 GB of RAM.

I have my MTA set to 50 threads. You can trim the MXScan down to 2, but 3 is fine as well. Oh, if ME is doing duplicate spam filtering that MXScan is doing, turn off the ME filtering that is duplicate and let MXScan handle it. This may help, too.
Robert Williams, Owner
www.WilliamsWebSolutions.com
#1 in MailEnable Business-Class Email Hosting - Switch to Williams Web Solutions and we will migrate your accounts to us for FREE!
We can be hired to help you with your Mail Enable server, too!

mc9ag
Posts: 10
Joined: Sat Sep 29, 2012 9:32 am

Re: Upgrade to 7.06 - Memory Leak in MEMTA.exe

Post by mc9ag »

I have 6Gb RAM with just over 1Gb free, it never really goes over 5Gb usage without the MTA memory problem. I've increased the MTA to 20 threads and upgraded 1 minor upgrade of MXScan from 2.7.202.0 to 2.7.201.0. Will see what happens.

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Re: Upgrade to 7.06 - Memory Leak in MEMTA.exe

Post by MailEnable »

The MTA does not hold any stateful data other than the Baysian element. It may be worthwhile turning this off for a test period.

Do you have any custom filters with large word list defined?

Other than that, the problem could be a resource leak when a plugin fails. I think those are the only possibilities.
Regards, Andrew

mc9ag
Posts: 10
Joined: Sat Sep 29, 2012 9:32 am

Re: Upgrade to 7.06 - Memory Leak in MEMTA.exe

Post by mc9ag »

I've been undertaking some further troubleshooting. This includes a full reinstall of MXScan and Clam (including all the config).
Under 'Extensions' - 'Message Filter' - I disabled 'Mailenable Antivirus Filter', 'Mailenable Bayesian Filter' and 'SpamAssassin'.
Under 'Messaging Manager' - 'Filters', I disabled 'F-Prot Filter'. This leaves just the 'Antispam' filter active for 'Where the message has a certain spam probability' and 'Where the message contains a URL to a blacklisted IP'.
I restarted the MTA and SMTP services.

I have F-prot's resident antivirus scanner not set to do active scanning - it just does a full disk scan every night.

Previous days filter logs show around 20-30 mails being marked as Spam, since disabling 'SpamAssassin' I get the following:
"05/03/13 05:49:36 Bayesian AutoTraining is being called, but the system could not find a reference to BayesianExecute."

The MTA logs show no problems and a steady stream of log entries.

The MEMTA.exe seems to continue to grow. I could just setup a Scheduled Task to restart the service, but would rather find the cause of the issue since the upgrade.

mc9ag
Posts: 10
Joined: Sat Sep 29, 2012 9:32 am

Re: Upgrade to 7.06 - Memory Leak in MEMTA.exe

Post by mc9ag »

Just an update to say the cause of this was resolved after updating to 7.09 as mentioned in this post:
http://forum.mailenable.com/viewtopic.p ... mta#p87435

My memta.exe now stays under 10Mb typically 6Mb.

Post Reply