fengsp / django-grpc-framework

gRPC for Django.
https://djangogrpcframework.readthedocs.io/
Apache License 2.0
390 stars 52 forks source link

How to set the options of default grpc server? #36

Closed skight-shen closed 2 years ago

skight-shen commented 2 years ago

It seems there is no api to set the options of grpc server. The options can be set only when initialize the grpc server.

I encountered an issue says "Received message larger than max (4750306 vs. 4194304)". I know how to solve it by setting the options of customized grpc server.

But I'd like to change the options of the default grpc server and i didn't found the entry of the default server. Does anyone can help or any suggestions?

mlazowik commented 2 years ago

Options would have to be passed here: https://github.com/fengsp/django-grpc-framework/blob/master/django_grpc_framework/management/commands/grpcrunserver.py#L61, so changes to this lib are needed to support passing options.

mlazowik commented 2 years ago

Made a patch for this in a fork: https://github.com/qedsoftware/django-grpc-framework/commit/5a498e47aa763a67163c42405936978b7f851902

skight-shen commented 2 years ago

@mlazowik Thank you very much. It works!