1

Topic: mysql error

Hi

i have this error in /var/log/mail.log from amavis

!)WARN save_info_preliminary: sql exec: err=1205, HY000, DBD::mysql::st execute failed: Lock wait timeout exceeded; try restarting transaction at (eval 115) line 166, <GEN43> line 2084

It's correct?

thks

Enrico

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: mysql error

Looks like your MySQL server is busy.
Try to increase max-connections in mysql config file my.cnf.

3

Re: mysql error

ZhangHuangbin wrote:

Looks like your MySQL server is busy.
Try to increase max-connections in mysql config file my.cnf.

this my settings.. set-variable = max_connections= 2048

when i upgrade iredadmin to version 1.5 there is a amavisd tread that block the table..

bye Enrico

4 (edited by Casa.it 2011-05-05 23:34:28)

Re: mysql error

it's a normal situation that i have table msgs  6.6 GB and msgrcpt 3.4 GB?

i have set AMAVISD_REMOVE_MAILLOG_IN_DAYS and AMAVISD_REMOVE_QUARANTINED_IN_DAYS to 2 days..

when i click on dashboard i waiting for 700/800 seconds..

Bye

5

Re: mysql error

Are you running iRedMail with MySQL backend and have iRedAPD running? If so, could you please try this step to fix it?
http://www.iredmail.org/forum/post9059.html#p9059

6 (edited by Casa.it 2011-05-06 15:38:47)

Re: mysql error

http://www.iredmail.org/forum/post9059.html#p9059

i run iRedAPD  but i have iredmail with ldap backend..

7

Re: mysql error

Casa.it wrote:

http://www.iredmail.org/forum/post9059.html#p9059

i run iRedAPD  but i have iredmail with ldap backend..

any ideas?

8

Re: mysql error

Casa.it wrote:

it's a normal situation that i have table msgs  6.6 GB and msgrcpt 3.4 GB?
i have set AMAVISD_REMOVE_MAILLOG_IN_DAYS and AMAVISD_REMOVE_QUARANTINED_IN_DAYS to 2 days..
when i click on dashboard i waiting for 700/800 seconds..

So many records.
Can you try logging into iRedAdmin-Pro, then accessing 'System -> Sent Mails/Received Mails/Quarantined Mails'? It will delete records which are orlder than 2 days automatically.

If the load time of Dashboard page still too long (we should reduce it to less than 10-30 seconds), please do contact me again.

9

Re: mysql error

ZhangHuangbin wrote:
Casa.it wrote:

it's a normal situation that i have table msgs  6.6 GB and msgrcpt 3.4 GB?
i have set AMAVISD_REMOVE_MAILLOG_IN_DAYS and AMAVISD_REMOVE_QUARANTINED_IN_DAYS to 2 days..
when i click on dashboard i waiting for 700/800 seconds..

So many records.
Can you try logging into iRedAdmin-Pro, then accessing 'System -> Sent Mails/Received Mails/Quarantined Mails'? It will delete records which are orlder than 2 days automatically.

If the load time of Dashboard page still too long (we should reduce it to less than 10-30 seconds), please do contact me again.

Hi Zhang

no records are not delete, this situation  make the system slow, all querys to mysql are slow.

Can you help me?  i make a downgrade from 1.5 because the situation was worse.

Bye

10

Re: mysql error

Hi Casa.

Can you try to delete old quarantined mails manually, and see whether it will be faster after deleted?
Here's SQL command used to delete old quarantined mails:
http://www.iredmail.org/wiki/index.php? … s.Manually

11

Re: mysql error

ZhangHuangbin wrote:

Hi Casa.

Can you try to delete old quarantined mails manually, and see whether it will be faster after deleted?
Here's SQL command used to delete old quarantined mails:
http://www.iredmail.org/wiki/index.php? … s.Manually

The quarantine mails are not a problem i delete mails day by day, for me the problem is sent/receive mail.

Bye

12

Re: mysql error

Casa.it wrote:

The quarantine mails are not a problem i delete mails day by day, for me the problem is sent/receive mail.

Try this:
http://www.iredmail.org/wiki/index.php? … g.Manually

13

Re: mysql error

ZhangHuangbin wrote:
Casa.it wrote:

The quarantine mails are not a problem i delete mails day by day, for me the problem is sent/receive mail.

Try this:
http://www.iredmail.org/wiki/index.php? … g.Manually

I killed the query after 50 minutes is not finished...  can troncate the table msgs and msgrcpt??

Bye

14

Re: mysql error

Casa.it wrote:

I killed the query after 50 minutes is not finished...  can troncate the table msgs and msgrcpt??

Truncate whole table (msgs, msgrcpt) will also delete quarantined mails.

You can try to release/delete quarantined mails first, then truncate tables msgs and msgrcpt.

15

Re: mysql error

ZhangHuangbin wrote:
Casa.it wrote:

I killed the query after 50 minutes is not finished...  can troncate the table msgs and msgrcpt??

Truncate whole table (msgs, msgrcpt) will also delete quarantined mails.

You can try to release/delete quarantined mails first, then truncate tables msgs and msgrcpt.

ok now the situation is fast, and i have upgrade to iredadmin 1.5,  how can I prevent this happen again?

Thks

Enrico

16

Re: mysql error

Casa.it wrote:

how can I prevent this happen again?

Setup a crontab job, delete from msgs/msgrcpt in a regular intervals.

17

Re: mysql error

ZhangHuangbin wrote:
Casa.it wrote:

how can I prevent this happen again?

Setup a crontab job, delete from msgs/msgrcpt in a regular intervals.

with this istruction? http://www.iredmail.org/wiki/index.php? … g.Manually

it's possible to insert this such as a feature?

Thks..

18

Re: mysql error

Casa.it wrote:

with this istruction? http://www.iredmail.org/wiki/index.php? … g.Manually

Yes.

Older records should be deleted automatically when you access "System -> Sent/Received/Quarantined Mails" in iRedAdmin-Pro, it must be a bug, and i will try to solve it in next release.

it's possible to insert this such as a feature?

Will try.

19

Re: mysql error

ZhangHuangbin wrote:
Casa.it wrote:

with this istruction? http://www.iredmail.org/wiki/index.php? … g.Manually

Yes.

Older records should be deleted automatically when you access "System -> Sent/Received/Quarantined Mails" in iRedAdmin-Pro, it must be a bug, and i will try to solve it in next release.

it's possible to insert this such as a feature?

Will try.

Thanks for your help!