Dubbo Data length too large: xxx, max payload: xxx problem solved

问题描述:
Caused by: java.util.concurrent.ExecutionException: org.apache.dubbo.remoting.RemotingException: Data length too large: 15557929, max payload: 8388608, channel: NettyChannel

Problem analysis:
1. The amount of data returned by the Dubbo interface is too large, and the maximum limit of the Dubbo interface is 8M.

If you want to increase the maximum packet limit of dubbo, you can set it to 20m or larger by dubbo.protocol.payload=20 1024 1024, but it is generally not recommended to set it.

Why can't large packets be transmitted?
Because the dubbo protocol uses a single long connection, if the size of the data packet requested each time is 500KByte, assuming that the network is a Gigabit network card 3, each connection can be up to 7MByte (different environments may be different, for reference), The maximum TPS (transactions per second) of a single service provider is: 128MByte / 500KByte = 262. The maximum TPS (transactions per second) for a single consumer to call a single service provider is: 7MByte / 500KByte = 14. If acceptable, you can consider using it, otherwise the network will become a bottleneck.

Refer to official literature

Guess you like

Origin blog.csdn.net/qq_34041723/article/details/126032391