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

@ -244,7 +244,10 @@ func StartServer(address string, model LLM) error {
if err != nil {
return err
}
s := grpc.NewServer()
s := grpc.NewServer(
grpc.MaxRecvMsgSize(50*1024*1024), // 50MB
grpc.MaxSendMsgSize(50*1024*1024), // 50MB
)
pb.RegisterBackendServer(s, &server{llm: model})
log.Printf("gRPC Server listening at %v", lis.Addr())
if err := s.Serve(lis); err != nil {
@ -259,7 +262,10 @@ func RunServer(address string, model LLM) (func() error, error) {
if err != nil {
return nil, err
}
s := grpc.NewServer()
s := grpc.NewServer(
grpc.MaxRecvMsgSize(50*1024*1024), // 50MB
grpc.MaxSendMsgSize(50*1024*1024), // 50MB
)
pb.RegisterBackendServer(s, &server{llm: model})
log.Printf("gRPC Server listening at %v", lis.Addr())
if err = s.Serve(lis); err != nil {