Skip to content

Commit f016cb4

Browse files
Set GRPC_ENABLE_FORK_SUPPORT to False (#2474)
1 parent 1cbe56e commit f016cb4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

nvflare/fuel/f3/drivers/aio_grpc_driver.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
import asyncio
16+
import os
1517
import random
1618
import threading
1719
import time
@@ -278,6 +280,9 @@ class AioGrpcDriver(BaseDriver):
278280

279281
def __init__(self):
280282
super().__init__()
283+
# GRPC with fork issue: https://github.com/grpc/grpc/issues/28557
284+
os.environ["GRPC_ENABLE_FORK_SUPPORT"] = "False"
285+
281286
self.server = None
282287
self.options = GRPC_DEFAULT_OPTIONS
283288
self.logger = get_logger(self)

nvflare/fuel/f3/drivers/grpc_driver.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import os
1516
import threading
1617
from concurrent import futures
1718
from typing import Any, Dict, List, Union
@@ -202,6 +203,8 @@ def shutdown(self):
202203
class GrpcDriver(BaseDriver):
203204
def __init__(self):
204205
BaseDriver.__init__(self)
206+
# GRPC with fork issue: https://github.com/grpc/grpc/issues/28557
207+
os.environ["GRPC_ENABLE_FORK_SUPPORT"] = "False"
205208
self.server = None
206209
self.closing = False
207210
self.max_workers = 100

0 commit comments

Comments
 (0)