Dear Björn,

The error indicates that /pthread_create /returned EAGAIN
(paraphrased as "Resource temporarily unavailable").
This error indicates that

   "the system lacked the necessary resources to create
    another thread, or the system-imposed limit on the total
    number of threads in a process {PTHREAD_THREADS_MAX}
    would be exceeded. " (from http://linux.die.net/man/3/pthread_create).

so, for the user, under which the server runs, check "ulimit -u",
limits.conf, etc. Can it be that you switched to a new machine with lower
limits than before?

What is you setting of maxthreads?

-gustaf neumann

Am 18.11.10 17:13, schrieb Björn Þór Jónsson:
Hi,

After recently upgrading from AOLserver 4.5.0 to 4.5.1 and from nspostgres-4.0 to nspostgres-4.1 the server is repeatedly crashing (when it gets hammered by the google bots). The error.log has many entries like these before the server dies:


[17/Nov/2010:02:18:42][700.3218660208][-default:6195-] Notice: exiting: exceeded max connections per thread [17/Nov/2010:02:18:43][700.3217636208][-default:6193-] Notice: exiting: exceeded max connections per thread [17/Nov/2010:02:18:44][700.3219172208][-default:6196-] Notice: exiting: exceeded max connections per thread [17/Nov/2010:02:18:45][700.3218148208][-default:6194-] Error: Tcl exception:
adp flush failed: connection closed
    abort exception raised
    while processing connection #31907:
        GET ...
        Host: localhost:8006
...
nsthreads: pthread_create failed in NsCreateThread: Resource temporarily unavailable [this is the last line in the log before the crash]


This is the database section of the AOLserver config file:

ns_section "ns/db/drivers"
ns_param postgres nspostgres.so

ns_section ns/db/pools
    ns_param   pool1              "Pool 1"
    ns_param   pool2              "Pool 2"
    ns_param   pool3              "Pool 3"

ns_section ns/db/pool/pool1
    ns_param   maxidle            1000000000
    ns_param   maxopen            1000000000
    ns_param   connections        5
    ns_param   extendedtableinfo  true
    ns_param   driver             postgres
    ns_param   datasource         localhost::${db_name}
    ns_param   user               $user_account

ns_section ns/db/pool/pool2
    ns_param   maxidle            1000000000
    ns_param   maxopen            1000000000
    ns_param   connections        5
    ns_param   extendedtableinfo  true
    ns_param   driver             postgres
    ns_param   datasource         localhost::${db_name}
    ns_param   user               $user_account

ns_section ns/db/pool/pool3
    ns_param   maxidle            1000000000
    ns_param   maxopen            1000000000
    ns_param   connections        5
    ns_param   extendedtableinfo  true
    ns_param   driver             postgres
    ns_param   datasource         localhost::${db_name}
    ns_param   user               $user_account

ns_section ns/server/${server}/db
    ns_param   pools              "*"
    ns_param   defaultpool        pool1


The server is running on Ubuntu 10.04.1 LTS
2.6.32-25-generic-pae #45-Ubuntu SMP Sat Oct 16 21:01:33 UTC 2010 i686 GNU/Linux


Is there anything I should configure differently or has any other ideas what might be causing this?


/Björn


--
Björn Þór Jónsson
http://bthj.is

-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[email protected]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.



--
Univ.Prof. Dr. Gustaf Neumann
Institute of Information Systems and New Media
WU Vienna
Augasse 2-6, A-1090 Vienna, AUSTRIA



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
<[email protected]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to