amavis suicide cause of TROUBLE in pre_loop_hook

The last day I got trouble with my amavis. Everything worked fine but after some time the amavis was started it killed itself with the following log messages shown up in /var/log/syslog:

Jul  4 10:31:23 server amavis[9941]: (!!)TROUBLE in pre_loop_hook: db_init: BDB no dbS: __fop_file_setup:  Retry limit (100) exceeded, File exists. at (eval 97) line 309.
Jul  4 10:31:23 server amavis[9941]: (!)_DIE: Suicide () TROUBLE in pre_loop_hook: db_init: BDB no dbS: __fop_file_setup:  Retry limit (100) exceeded, File exists. at (eval 97) line 309.

The solution was pretty easy: Clean up the cache for the database (as root of course):

rm /var/lib/amavis/db/*

That’s it. After the next start of amavis the problem did not occur anymore.