[Libwebsockets] WARN: ERROR on accept: Too many open files

Jack Mitchell ml at communistcode.co.uk
Wed Feb 13 16:40:25 CET 2013


On 13/02/13 14:23, "Andy Green (林安廸)" wrote:
> On 13/02/13 21:41, the mail apparently from Jack Mitchell included:
>> Hi,
>>
>> During testing today I managed to get the websockets library into this
>> state, and couldn't get out of it.
>>
>> [1360762763:2945] WARN: ERROR on accept: Too many open files
>> [1360762763:2971] WARN: ERROR on accept: Too many open files
>> [1360762763:2992] WARN: ERROR on accept: Too many open files
>> [1360762763:3537] WARN: ERROR on accept: Too many open files
>> [1360762763:4061] WARN: ERROR on accept: Too many open files
>> [1360762763:4583] WARN: ERROR on accept: Too many open files
>> [1360762763:5104] WARN: ERROR on accept: Too many open files
>> [1360762763:5626] WARN: ERROR on accept: Too many open files
>> [1360762763:6149] WARN: ERROR on accept: Too many open files
>> [1360762763:6665] WARN: ERROR on accept: Too many open files
>> [1360762763:7173] WARN: ERROR on accept: Too many open files
>> [1360762763:7681] WARN: ERROR on accept: Too many open files
>> [1360762763:8188] WARN: ERROR on accept: Too many open files
>> [1360762763:8697] WARN: ERROR on accept: Too many open files
>> [1360762763:9204] WARN: ERROR on accept: Too many open files
>> [1360762763:9712] WARN: ERROR on accept: Too many open files
>> [1360762764:0220] WARN: ERROR on accept: Too many open files
>> [1360762764:0728] WARN: ERROR on accept: Too many open files
>> [1360762764:1236] WARN: ERROR on accept: Too many open files
>> [1360762764:1806] WARN: ERROR on accept: Too many open files
>>
>> Does this mean that sockets aren't being closed properly somewhere and
>> the maximum limit is being reached?
>
> It means it ran out of descriptors, that can be open files or open 
> sockets.
>
> However checking with ab and chrome, using lsof, eg
>
> $ sudo lsof -n -p 4667
>
> where 4667 was my server pid, I can see there are no persistent open 
> sockets in the server process, just the listen socket that there 
> should be.
>
> So this can equally well be a runaway file open action, or there's 
> some specific, unusual path where the socket doesn't get closed. lsof 
> will show it up if it's socket or file descriptors you are collecting.
>
> -Andy
>

Ah yes, this showed up a problem elsewhere in the code, but which had 
managed to manifest it'self through libwebsockets.

Regards,

-- 

   Jack Mitchell (jack at embed.me.uk)
   Embedded Systems Engineer
   http://www.embed.me.uk

--




More information about the Libwebsockets mailing list