Commit 793dd7e 1 parent a840d75 commit 793dd7e Copy full SHA for 793dd7e
File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import (
40
40
persistenceClient "go.temporal.io/server/common/persistence/client"
41
41
"go.temporal.io/server/common/resolver"
42
42
"go.temporal.io/server/common/resource"
43
+ "go.temporal.io/server/common/util"
43
44
)
44
45
45
46
type (
@@ -146,7 +147,10 @@ func (s *ServerImpl) Stop() error {
146
147
}
147
148
148
149
func (s * ServerImpl ) startServices () error {
149
- ctx , cancel := context .WithTimeout (context .Background (), serviceStartTimeout )
150
+ // The membership join time may exceed the configured max join duration.
151
+ // Double the service start timeout to make sure there is enough time for start logic.
152
+ timeout := util .Max (serviceStartTimeout , 2 * s .so .config .Global .Membership .MaxJoinDuration )
153
+ ctx , cancel := context .WithTimeout (context .Background (), timeout )
150
154
defer cancel ()
151
155
results := make (chan startServiceResult , len (s .servicesMetadata ))
152
156
for _ , svcMeta := range s .servicesMetadata {
You can’t perform that action at this time.
0 commit comments