FATAL: Thread create failed: Cannot allocate memory

Alan DeKok aland at deployingradius.com
Fri Oct 12 14:55:11 CEST 2007


Phil Mayers wrote:
> We had one of our MAC-auth radius server instances hang up with this
> error at about 0200 this morning.

  Ouch.

> That server receives pretty heavy load, and it's bursty, so we see this
> a couple of times a day:
> 
> The maximum number of threads (32) are active, cannot spawn new thread
> to handle request

  That shouldn't be a problem.  The request will just get queued.

> ...but it does not cause problems. An inability to create a new thread
> is an entirely different matter though; it implies <max threads are
> running, the server tried to create a new one, and the OS couldn't
> allocate a thread.
> 
> Any ideas how to resolve this? Version is FreeRadius 1.1.6 (only reason
> we haven't upgraded is change control, it's due shortly)

  Set all of the thread information to the same numbers:

  start_servers = 32
  max_servers = 32
  min_spare_servers = 0
  max_spare_servers = 32

  That way threads won't be created, but they also won't be deleted.  I
suspect it's the deletion of threads that is causing the problem.  i.e.
delete/create/delete/create/.../panic !



More information about the Freeradius-Users mailing list