Hi,
A while ago, I changed over to storing my quarantine, etc. in a mysql db.
So far it has worked wonderfully except for one problem.
The DB has grown to about 5GB (ibdata file), and every night, when I am
using the script included in the README.mysql to get rid of old entries, I
get the following error:
Sep 9 03:18:54 george.eliot.priv.at /usr/sbin/amavisd[14068]: (14068)
(!!)TROUBLE in check_mail: quar+notif FAILED: temporarily unable to
quarantine: 451 4.5.0 Storing to sql db as mail_id MSQokJpLajBT failed:
writing mail text to SQL failed: Error closing, flush: sql inserting text
failed, sql exec: err=1205, S1000, DBD::mysql::st execute failed: Lock
wait timeout exceeded; try restarting transaction at (eval 87) line 166,
<GEN106> line 718. at (eval 89) line 224, <GEN106> line 718. at (eval 89)
line 92, <GEN106> line 718. at (eval 89) line 355., id=14068 at
/usr/sbin/amavisd line 11673.
I realise this is a SQL issue, I was just wondering if anyone has
experience with this, or better still a solution.
The script that runs is the following:
DELETE FROM msgs WHERE time_num < UNIX_TIMESTAMP()-30*24*60*60;
DELETE FROM msgs WHERE time_num < UNIX_TIMESTAMP()-60*60 AND content IS
NULL;
DELETE FROM quarantine
WHERE NOT EXISTS (SELECT 1 FROM msgs WHERE mail_id=quarantine.mail_id);
DELETE FROM msgrcpt
WHERE NOT EXISTS (SELECT 1 FROM msgs WHERE mail_id=msgrcpt.mail_id);
DELETE FROM maddr
WHERE NOT EXISTS (SELECT 1 FROM msgs WHERE sid=id)
AND NOT EXISTS (SELECT 1 FROM msgrcpt WHERE rid=id);
I am using amavisd-new-2.6.1. The machine gets a really high load, when it
does the above, so much so, that sometimes I also get the following
errors:
Sep 9 03:48:46 george.eliot.priv.at /usr/sbin/amavisd[17556]: (17556)
(!!)TROUBLE in process_request: Can't write response to socket: Broken
pipe, fileno=13 at (eval 82) line 145.
Sep 9 03:50:31 george.eliot.priv.at /usr/sbin/amavisd[21872]: (21872)
(!!)TROUBLE in check_mail: creating_partsdir FAILED: Can't create
directory /var/amavis/tmp/afm891dgsv019798/parts: No such file or
directory at /usr/sbin/amavisd line 9734.
Sep 9 03:50:31 george.eliot.priv.at /usr/sbin/amavisd[21872]: (21872)
(!!)TROUBLE in process_request: Can't write response to socket: Broken
pipe, fileno=13 at (eval 82) line 145.
This unfortunately happens pretty much every night, and I am afraid, I may
be loosing important mails!
Any help would be appreciated.
Thanks,
.peter
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/