'Why is it by design that MySQL closes the connection when max_packet_size is exceeded? Evidence based opinions acceptable as Answer

I have numerous WordPress websites that crash at random due to max_packet_size being exceeded by a request.

I have just increased the size, to hopefully avoid this in the future, but I don't understand why MySQL would intentionally severe a connection for a request that was too large instead of rejecting it.

This results in these websites going down. And I'm not confident that increasing the max_packet_size really solves the root problem which is the shutting down.

https://dev.mysql.com/doc/refman/8.0/en/packet-too-large.html

Does anyone have any insight as to why this occurs? Is my perspective on this issue lacking?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source