Skip to content

OpenDKIM times out on startup #209

@GeorgeCox

Description

@GeorgeCox

Versions:
opendkim 2.11.0
OS Debian 11

I am running opendkim servers with a mysql backend for both the signing table and key table.
This setup was working nicely with around ~1000 domains in the database.
We have since added ~100k domains and ~200k keys to the database, all the opendkim servers seemed to be coping well with this, though I've now discovered that the opendkim service will not restart.

When trying to start the service I see a systemd timeout as the service is taking so long to start up.
If I run opendkim outside of systemd it hangs and doesn't fork like you'd expect.
Running with strace I can see opendkim seems to be processing all the domains/keys from the database, and now we have so many the service is taking hours to start.
The process eventually fails complaining it cannot find a valid key record for a particular domain in the keytable, so never actually starts.

I have a script validating that we have a key for every domain in the database, but this database is being updated as we add new domains/keys, so I think the error which causes the process to exit is due to the database changing while opendkim is starting.

I've looked through your documentation, but cannot see a way to do either of the following:

  • Ignore missing keys in the keytable on startup
  • Don't try to process every domain/key in the database on startup

The servers which have not been restarted seem to be coping fine and are picking up the new domains/keys which have been added to the DB.

I also can't find any information on how other people are attempting to use opendkim at a large scale.

Any suggestions would be appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions