question about concurrent auth packet process.

Liu dejun dejun.liu at gmail.com
Thu Dec 29 08:45:12 CET 2005


When lots of concurrent auth packets arrived at radius server .by default
,if radius server exceeds the max packet process thread ,it will discard the
auth packet/
see the code below in version 1.0.5

int thread_pool_addrequest(REQUEST *request, RAD_REQUEST_FUNP fun)
{
    /*
     *    If the thread pool is busy handling requests, then
     *    try to spawn another one.
     */
    if (thread_pool.active_threads == thread_pool.total_threads) {
        if (spawn_thread(request->timestamp) == NULL) {
            radlog(L_INFO,
                   "The maximum number of threads (%d) are active, cannot
spawn new thread to handle request",
                   thread_pool.max_threads);
            return 0;
        }
    }

    /*
     *    Add the new request to the queue.
     */
    request_enqueue(request, fun);

    return 1;
}

why not just add the auth packet to the queue of the thread if the active
thread number exceed the total thread number?






--
Yesterday is a history.
Tomorrow is a mystery.
Today is a gift.
That's why we call it "the Present".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20051229/0e21f2df/attachment.html>


More information about the Freeradius-Devel mailing list