]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: Change instances.lock settings to make it less likely to fail
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 23 Oct 2017 10:34:56 +0000 (13:34 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 23 Oct 2017 10:34:56 +0000 (13:34 +0300)
With use_io_notify it's spending less time usleep()ing. Use also a slightly
longer timeout just in case.

If a lot of instances were started at the same time, some of them could have
failed with:
master: Error: file_dotlock_open(.../instances) failed: Resource temporarily unavailable

src/lib-master/master-instance.c

index c60eb1e49b2650b0a1ab9dd9b2124e455c8c07ef..580d7ef2c552ec56e970354427785fc6c5ceaa57 100644 (file)
@@ -29,8 +29,9 @@ struct master_instance_list_iter {
 };
 
 static const struct dotlock_settings dotlock_set = {
-       .timeout = 2,
-       .stale_timeout = 60
+       .timeout = 10,
+       .stale_timeout = 60,
+       .use_io_notify = TRUE,
 };
 
 struct master_instance_list *master_instance_list_init(const char *path)