Request throttling

Alan DeKok aland at deployingradius.com
Thu Jul 2 22:44:06 CEST 2015


On Jul 2, 2015, at 11:01 AM, srithar jeevadurai <srijeevadurai1 at gmail.com> wrote:
> Thanks a lot for your reply. Let me explain the actual scenario.
> 
> 1) Radius server is sending request to an external process over tcp/ip
> socket for accounting (start/stop/interim) request.

  That's normal.  It's what the SQL module uses to query the SQL databases.

> 2) Based on the external process response, radius (custom module) will
> reply to GGSN.

  That too, is normal.

> 3) Some time if response is slow from external process then radius server
> is facing child hung error and we have to restart radius server for the
> same.

  Not exactly.... if the response takes *forever*, then the child thread will be blocked, because it's waiting for the reply from the TCP connection.

  Here, "forever" means anything over 5 seconds.  If your back end can't respond to a TCP request in 5 seconds, it's broken.  Fix it.  No amount of poking FreeRADIUS will make the back-end faster.

> 4) Since it is online system, we don;t want child hung happens actual
> intention is not to restart the system.

  Or, you can close the blocked TCP connections.  Or, re-start the back-end you're using.  Which will close the blocked TCP connections.

> 5) I believe that it is happening may be due to radius process queue is
> filled with request and getting aged out.

  No.

  The "child is hung" message comes after the request has been pulled out of the queue.  If the queue was full, you would see errors saying "queue is full".  If the request ages out, you would see errors saying that, too.

  The problem here is that your module is destroying the server.  Fix your module.  Fix the back-end so it takes less than 0.1s to respond.

> Is there any throttling can be done at freeRadius to handle the same so
> that it will not run into child hung state/no need to restart radius server.

  For your situation, no.  Any throttling will just hide the problem, and make it worse in the long run.

> I request you to provide your suggestion please.

  Fix your back-end so that it can handle the load.  No amount of poking FreeRADIUS will fix this problem.

  Alan DeKok.




More information about the Freeradius-Users mailing list