chore: bump grpc limits to 50MB (#5212)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2025-04-19 08:53:24 +02:00 committed by GitHub
parent 8b3f76d8e6
commit 8abecb4a18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 161 additions and 31 deletions

View file

@ -121,7 +121,12 @@ class BackendServicer(backend_pb2_grpc.BackendServicer):
return (prompt, image_paths)
def serve(address):
server = grpc.server(futures.ThreadPoolExecutor(max_workers=MAX_WORKERS))
server = grpc.server(futures.ThreadPoolExecutor(max_workers=MAX_WORKERS),
options=[
('grpc.max_message_length', 50 * 1024 * 1024), # 50MB
('grpc.max_send_message_length', 50 * 1024 * 1024), # 50MB
('grpc.max_receive_message_length', 50 * 1024 * 1024), # 50MB
])
backend_pb2_grpc.add_BackendServicer_to_server(BackendServicer(), server)
server.add_insecure_port(address)
server.start()