Skip to content

使用gRPC接口传输数据时,限制消息大小4MB #96

@Hiworle

Description

@Hiworle

在使用grpc方式调用go-judge服务器的exec接口时,出现异常:

io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: grpc: received message larger than max (7100036 vs. 4194304)
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167)

这似乎是由于创建grpc server时未指定消息大小导致的,添加配置后正常:

image

master...Hiworle:go-judge:master

我对golang不甚了解,有错误的地方还请指正。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions