Hundreds of open files in openfire

I have hundreds of opened files like that in openfire

java 2995 daemon *361r FIFO 0,12 0t0 1304072700 pipe
java 2995 daemon *362w FIFO 0,12 0t0 1304072700 pipe
java 2995 daemon *363u a_inode 0,13 0 9526 [eventpoll]
java 2995 daemon *364r FIFO 0,12 0t0 1304072701 pipe
java 2995 daemon *365w FIFO 0,12 0t0 1304072701 pipe
java 2995 daemon *366u a_inode 0,13 0 9526 [eventpoll]
java 2995 daemon *367r FIFO 0,12 0t0 1304072702 pipe
java 2995 daemon *368w FIFO 0,12 0t0 1304072702 pipe
java 2995 daemon *369u a_inode 0,13 0 9526 [eventpoll]
java 2995 daemon *370r FIFO 0,12 0t0 1304072703 pipe
java 2995 daemon *371w FIFO 0,12 0t0 1304072703 pipe
java 2995 daemon *372u a_inode 0,13 0 9526 [eventpoll]
java 2995 daemon *373r FIFO 0,12 0t0 1304072704 pipe
java 2995 daemon *374w FIFO 0,12 0t0 1304072704 pipe
java 2995 daemon *375u a_inode 0,13 0 9526 [eventpoll]

After some time openfire reach the linux limit of 65K opened files and HUNG.

Can someone help me to understand what is that and how to eliminate and how to solve the problem ?

Luis H>
=-=-=-=-=-=-=-=-

Dear luish,

thank you for reporting! Unfortunately, this is a know issue with the “internal” connections (Java streams, on Unix implemented by two pipes and one event polling socket) of the Websocket-Proxy that routes the A/V traffic to the JVB2 (https://github.com/igniterealtime/openfire-pade-plugin/issues/202)

Until a fix is found, you have to restart the OpenFire server with some regular intervall. I may send you a script that evaluate the number if filehandles used by a certain pid (or the overall).

If you’re able to provide a provoking, reproducable testcase, please let us know about in this issue.

BTW: The file handle limit for a process is configurable and may be rised, but this is no enduring solution, of course.

Hi,

We found a way to by-pass the problem.

We insert a sleep in the code and the problem no more exists.

Using 500 ms sleep the problem still but using 5000ms sleep the problem was solved.

Something Like this:

Accept chat POST

/rest/api/restapi/v1/chat/{ofchat}/offer/{roomID}

Wait 5000 miliseconds

/rest/api/restapi/v1/chat/{ofchat}/rooms/{roomID}?service=conference