Skip to content

Commit

Permalink
lib-master: Change instances.lock settings to make it less likely to …
Browse files Browse the repository at this point in the history
…fail

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
  • Loading branch information
sirainen committed Oct 23, 2017
1 parent 5b0b45b commit f8cd64f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib-master/master-instance.c
Expand Up @@ -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)
Expand Down

0 comments on commit f8cd64f

Please sign in to comment.