[Live-devel] Problem using live555MediaServer with more than 250 clients

PROMONET Michel michel.promonet at thalesgroup.com
Wed Dec 10 04:24:34 PST 2014


            Hi Ross,

I am connecting quite a lot of RTSP client to live555MediaServer.
But when the filedescriptor number is over 1024 (which is the FD_SETSIZE of the operating system), the process abort in the well know internalError abort.

BasicTaskScheduler::SingleStep(): select() fails: Bad file descriptor
socket numbers used in the select() call: ...... 1113(e) 1115(e) 1119(e) 1121(e) 1123(e) 1125(e) 1129(e) 1131(e) ...

As each RTSP client needs about 4 filedescriptors (RTSP,RTP,RTCP, file), the 1024 limits is reached with about 250 clients.
I guess this occurs because BasicTaskScheduler::SingleStep read after the end of the fd_set structures.

In order to avoid to reach the abort, I try an extra sanity check inside BasicTaskScheduler::setBackgroundHandling
void BasicTaskScheduler::setBackgroundHandling(int socketNum, int conditionSet, BackgroundHandlerProc* handlerrProc, void * clientData) {
if ( (socketNum <0) || (socketNum >= FD_SETSIZE) ) return;
...
Doing like this, avoid abort, but it doesnot inform the RTSPClient that its socket was refused.
Such a thing need a feedback from setBackgroundHandling.

Thanks again for your support,

            Michel.

[@@ THALES GROUP INTERNAL @@]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20141210/fc3c28c6/attachment.html>


More information about the live-devel mailing list