| Previous | Next |
| ELOOP | EL3RST |
EMSGSIZE
The message cannot be represented as one required unit
EMSGSIZE is significant for sockets and protocols that require an atomic message. The send operation cannot split the supplied payload into acceptable units under the socket's rules, so the kernel rejects it instead of silently sending only a prefix.
That makes this different from a stream write that merely completes partially. It is also different from ENOBUFS: EMSGSIZE is about the size or framing constraint of this message, while ENOBUFS concerns available buffering resources.
Useful measurements
- Record the payload length, socket type, protocol, destination family, and whether the call used
sendmsg()with several I/O vectors. - For a datagram protocol, compare the attempted payload with the path and protocol limits rather than assuming that an application-level chunk size is portable.
- Check whether the application accidentally added headers, encryption overhead, or encapsulation after it calculated a maximum payload size.
What not to conclude
The error does not show that the peer received a malformed application message. The local kernel rejected the attempted send before it could form a permitted transmission. Retrying unchanged data only repeats the same size constraint.
References
Looking for a different code? Search another status or error code.
