Print Page | Close Window

Mails are not going in quarantine. gives Error.

Printed From: LogSat Software
Category: Spam Filter ISP
Forum Name: Spam Filter ISP Support
Forum Description: General support for Spam Filter ISP
Printed Date: 21 May 2019 at 8:56am

Topic: Mails are not going in quarantine. gives Error.
Posted By: prashant31
Subject: Mails are not going in quarantine. gives Error.
Date Posted: 02 March 2011 at 4:23am
We are facing the weird problem. Mails are not delivered to quarantine area. We have checked all the settings. Rejected mails should go to quarantine.

we get the following error message in logs.

"Error - Unable to add email to quarantine - too many updates pending - archival queued".

What is the meaning of this? Are we supposed to update something? And what is the location of queued archivals?

Posted By: LogSat
Date Posted: 02 March 2011 at 8:21am

We just replied to your support email, but in case someone has the same issue, I'm including our response to you here as well:


The error indicates that SpamFilter is unable to store the spam emails in the quarantine database as the database is returning the error "too many updates pending" when SpamFilter attempts to insert the new database records. This is often caused in part due to a large number of errors like this:
Database is busy - cannot quarantine EMail from  to  - archival queued

If you look in the C:\Program Files\SpamFilter\quarantine directory (substitute the correct installation path if needed), you may find all the pending emails to be archived queued there. As soon as the database is able to accept more inserts SpamFilter will automatically resume the process of inserting those spam emails in the database. If there are no files in this folder then it means SpamFilter was able to insert all queued spam emails in the database and is also archiving current spam without any holdups.

Are you using Microsoft SQL Server or MySQL as your database platform? MySQL is usually much less efficient that Microsoft SQL Server, and may experience longer delays when removing the older spam emails from the quarantine database. For MySQL, we sometimes suggest the addition of extra indexes to improve performance if this process is taking too long. Judging from the "Linux" in your email addresses, I'm guessing you are using MySQL :-) so I'll add the specific indexes for that platform below.
For Microsoft SQL Server instead we have a different suggested process that uses stored procedures. In any case, we only suggest these alternatives if there are indeed database performance issues, as they are usually not needed, and implementing them requires some manual modifications to the database structure. So if you "usually" do not have any temp files in the "C:\Program Files\SpamFilter\quarantine" directory I mentioned earlier, and the spam emails arrive in the database with only at most a few minutes delay, we wold not suggest making the changes.

As mentioned however, if you'd like, for MySQL you could you try adding two indexes to the tblQuarantine table. Both are made up of multiple fields:

Index for: emailto, msgid, msgdate, deliver, expire 
and one for: MsgID, Deliver, Expire, ServerID 

This may help increase performance while deleting records.

You can create the indexes easily using the MySQL Administrator, or if you wish, you can use execute the SQL statements below: 

ALTER TABLE `SpamFilter`.`tblquarantine` ADD INDEX Optimize_1(`emailto`, `msgid`, `msgdate`, `deliver`, `expire`);
ALTER TABLE `SpamFilter`.`tblquarantine` ADD INDEX Optimize_2(`msgid`, `deliver`, `expire`, `serverid`);

There is no need to stop/restart SpamFilter while doing this. Please let us know if this helps.

Roberto Franceschetti" rel="nofollow - LogSat Software" rel="nofollow - Spam Filter ISP

Posted By: yapadu
Date Posted: 03 March 2011 at 5:06am
We had this problem all the time, the larger the database worse it gets.

We solved the problem by turning off the housekeeping task that removes the item from quarantine (every 1 hour I think?) and doing it ourselves using a different technique than the one spamfilter uses by default.

I posted about it on here what we were planning to do, Roberto suggested it was not a good idea but it has been working perfectly for us.  We now run the housekeeping every 30 minutes and it takes only a fraction of a second to complete.

I am a user of SF, not an employee. Use any advice offered at your own risk.

Print Page | Close Window