Own implementation of a dict server. Is dict lookup multi threaded or single threaded?
tss at iki.fi
Fri Apr 8 08:33:06 UTC 2016
On 08 Apr 2016, at 09:19, martijn.list <martijn.list at gmail.com> wrote:
> I have created my own dict server (proxy:[<dict path>]:<destination
> dict>) to access a proprietary database.
> What happens if the dict server lookup is slow? for example because the
> lookup process takes some time?
Looking at the code, there's a 30sec timeout:
/* Abort dict lookup after this many seconds. */
#define DICT_CLIENT_READ_TIMEOUT_SECS 30
/* Log a warning if dict lookup takes longer than this many seconds. */
#define DICT_CLIENT_READ_WARN_TIMEOUT_SECS 5
> Does Dovecot access the dict proxy from multiple threads or is this a
> single threaded process?
It depends on what you're using the dict for. If you're using passdb-dict or userdb-dict, then I think all the lookups are coming from the one auth master process. If you're using it elsewhere, then you'll probably be getting connections from many different processes.
More information about the dovecot