Drogon's default WebSocket client message size limit is 128 KB. When a client (e.g. erdblick) sends a tile request that exceeds this limit, Drogon rejects the message and shuts down the connection. This triggers a cascade of errors:
The size of the WebSocket message is too large! (Drogon rejects incoming frame)
Unknown frame type (corrupted buffer parsing after rejection)
Connection is not connected, give up sending (mapget tries to send on dead connection)
std::terminate called, aborting (core dump)
The crash happens because Drogon calls handleNewMessage() and handleConnectionClosed() with no exception protection. Any exception propagating from mapget's WebSocket handlers terminates the process.
Two fixes needed:
- Raise the client WS message size limit (128 KB is too small for large tile requests)
- Add try-catch around WebSocket handler callbacks and
conn->send() to prevent std::terminate
Drogon's default WebSocket client message size limit is 128 KB. When a client (e.g. erdblick) sends a tile request that exceeds this limit, Drogon rejects the message and shuts down the connection. This triggers a cascade of errors:
The size of the WebSocket message is too large!(Drogon rejects incoming frame)Unknown frame type(corrupted buffer parsing after rejection)Connection is not connected, give up sending(mapget tries to send on dead connection)std::terminate called, aborting(core dump)The crash happens because Drogon calls
handleNewMessage()andhandleConnectionClosed()with no exception protection. Any exception propagating from mapget's WebSocket handlers terminates the process.Two fixes needed:
conn->send()to preventstd::terminate