Forum OpenACS Q&A: Could not allocate handles from pool main

I am trying to configure the Intranet but consistently come up with an error message saying "parameter not found in the intranet section of your server's paramter file". I have checked this file against a working .ini on the oracle system and there don't seem to be any irregularities.

The server log gives the following output
could not allocate 2 handles from pool "main"
    while executing
"ns_db gethandle main 2"
    invoked from within
"set db_list [ns_db gethandle main 2]"
    (file "/web/pacs/www/intranet/employees/admin/index.tcl" line 14)
    invoked from within
"source $script"
    (procedure "ns_sourceproc" line 6)
    invoked from within
"ns_sourceproc cns0 {}"
Any ideas what's going on here?

grant
Collapse
Posted by Ben Adida on
which version of ACS/pg are you using? Are you using the .ini or .tcl config file format? How many connections do you have set up in your "main" pool from your main parameter file?
Collapse
Posted by Grant Schofield on
I am using the latest ACS/pg, with the latest postgres, 7beta3.

I have had to change to the .ini format as I cannot get the system to work using the .tcl initialisation file (see previous posts). I have "connections=4" for main, subquery and log.

Collapse
Posted by Alan Walworth on
I'm running into the same problem (when I try to access ticket tracker).  Grant, or anyone, do you know the explanation and solution?
Collapse
Posted by Dirk Gomez on
A) you have run out of handles.
or
B) you ran ns_db gethandle main twice within the same thread which doesn't work either. From the AOLserver docs:
ns_db gethandle returns the specified number of handles from the specified pool. If poolname is not specified, the Defaultpool from the configuration file is used. If nhandles is not specified, 1 handle is returned. (Note that if you specify nhandles, you must also specify a poolname.) If not enough handles are available to fulfill the request, it waits until they are available. You must request all the handles you will need for a specific pool with one call to ns_db gethandle. You must release all your database handles explicitly (with ns_db releasehandle ) before acquiring more. If you request multiple handles from the database, this function returns a Tcl list of database handles (space delimited). In this case, each handle must be released with a separate call to ns_db releasehandle.