Increase deadlock timeout, make configurable (fixes #389, fixes #393)