0

I'm getting some weird errors in /var/log/exim_mainlog when someone is trying to send an email. The problem is I can't solve this so i'll try here.

2012-10-29 00:35:54 DBD::SQLite::db prepare failed: database is locked at /etc/exim_greylist_sqlite.pl line 1013, <HAN1> line 66.
2012-10-29 00:35:54 H=valid_hostname [valid_ip]:5555 F=<mail@example.com> temporarily rejected RCPT <mail@example.com>: failed to expand ACL string "${perl{greylist}}": Can't call method "execute" on an undefined value at /etc/exim_greylist_sqlite.pl line 1014, <HAN1> line 66.
2012-10-29 00:35:54 SMTP connection from valid_hostname [valid_ip]:5555 closed by QUIT

Some lines from exim_greylist_sqlite:

1012     my $query = "select strftime('%s', block_expires, 'utc')-strftime('%s','now') from relaytofrom where rcpt_to='$lp' and mail_from='$sender_addr'";

1013     $sth = $isp->prepare($query) || print FILE "$query\n";
1014     $sth->execute || print FILE "$query\n";
1015     my @status_array = $sth->fetchrow_array;
1016     $sth->finish;

I don't even know from where to start and solve this. I have tried searching on cPanel forums, tried using google in multiple ways but with no result :(

mnel
  • 113,303
  • 27
  • 265
  • 254
Ionut
  • 476
  • 1
  • 3
  • 12

1 Answers1

0

These seem applicable to your case:

Why does SQLite give a "database is locked" for a second query in a transaction when using Perl's DBD::SQLite?

How can I UPDATE rows returned by a SELECT in a loop?

It sounds like one process is in the middle of a select while some other process is in doing something that is trying to update the data. Find out what else is accessing that sqlite database and has it locked. If I'm right, everything after the first line is just blow back from the root cause: table lock contention.

Community
  • 1
  • 1
Todd Lyons
  • 998
  • 12
  • 19