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

"Andy Green (林安廸)" andy at warmcat.com
Wed Feb 13 15:23:24 CET 2013


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




More information about the Libwebsockets mailing list