Skip to content

Commit

Permalink
Turn on the 'preload_app' setting to share all model artifacts betwee…
Browse files Browse the repository at this point in the history
…n Gunicorn workers
  • Loading branch information
Sungjun, Kim committed Oct 29, 2021
1 parent 4e1a10b commit 1db97c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bentoml/server/gunicorn_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ def __init__(
else:
self.bind = bind

# 1. To share all model artifacts between Gunicorn workers,
# we set 'preload_app' to True. False on default)
# - Ref. : https://docs.gunicorn.org/en/stable/settings.html#preload-app
self.options = {
"bind": self.bind,
"preload_app": True,
"timeout": timeout, # TODO
"limit_request_line": max_request_size,
"loglevel": loglevel.upper(),
Expand Down

0 comments on commit 1db97c3

Please sign in to comment.