[Libwebsockets] [1357004006:1893] ERR: Unable to spill ext 2819 vs 1448
ml at communistcode.co.uk
Wed Apr 3 10:28:04 CEST 2013
On 03/04/13 01:55, "Andy Green (林安廸)" wrote:
> On 02/04/13 22:51, the mail apparently from Jack Mitchell included:
>> Hi Everyone,
>> Today I started encountering this error in my websocket application and
>> for the life of me I can't figure out why I am getting it, could anyone
>> shed any light?
>> [1357004006:1893] ERR: Unable to spill ext 2819 vs 1448
> What version of the library are you using?
> The basic problem is you tried to send a packet of length 2819 but the
> OS only accepted to buffer 1448 bytes of it. Then we're screwed
> (can't send more without blocking, no arrangements in lws to buffer
> partial send packet) so it closes the connection, provoking the
> "closed on 0 length read" reports on the other side.
> Currently lws takes action to reserve OS buffers for each connection
> of the size of the read buffer for the protocol to stop this happening.
> If you make sure your rx buffer size is say 3000 in the protocol
> definition used on this connection, and use current libwebsockets, you
> should be OK.
This fixed it, I set it 4096 and also implemented
in my callback on writeable state, like you do in the test server. I think I may have been seeing this intermittently and not realising and putting it down to something else. I am working on master and keep fairly up to date, has there been further error checking for this put in recently, as it never used to flag up.
Thanks for your help (again!).
Jack Mitchell (jack at embed.me.uk)
Embedded Systems Engineer
More information about the Libwebsockets