Forum OpenACS Q&A: postgres access hangs aolserver (Q&A)

I solved this problem halfway through posting - this is for the archives in case someone else has the same problem.
After installation, I could work in ACS for a limited period of time, then some database access will produce a log entry like this and AOLServer would hang. I could kill it (and init respawned it) and then all would be well for a while longer. I was using versions: AOLServer 3.2, nspostgres.so 3.0 OpenACS 3.2.4 and Postgres 7.0.2.
[26/Oct/2000:14:40:28][1965.8196][-conn0-] Notice: dbdrv: opening
database 'postgres:localhost::acstest'
[26/Oct/2000:14:40:28][1965.8196][-conn0-] Notice: nspostgres: opening
'acstest' on 'localhost'
[26/Oct/2000:14:40:28][1965.8196][-conn0-] Notice: nspostgres: opened
connection to 'localhost::acstest'
[26/Oct/2000:14:40:29][1965.8196][-conn0-] Notice: dbinit:
sql(localhost::acstest): '
        select user_id, token, secure_token,
               last_ip, last_hit from sec_sessions
        where session_id = 2
    '
[26/Oct/2000:14:40:29][1965.8196][-conn0-] Notice: dbinit:
sql(localhost::acstest): 'select ad_group_member_p(1,
system_administrator_group_id()) from dual'
[26/Oct/2000:14:40:30][1965.8196][-conn0-] Error: 

Solution: use the postgres driver from OpenACS, not the one from AOLServer. ln -s postgres.so nspostgres.so to avoid having to change the config files. Not sure why this works.
Collapse
Posted by Roberto Mello on
I had the same thing happen to me yesterday after I compiled AOLserver 3.2. I was lazy so I thought of using the nspostgres.so.

It seems that nspostgres.so can't recover from errors... In my case I was modifying the Survey module and forgot to change a constraint, that caused my inserts within a transaction to fail.

Apparently nspostgres.so can't recover from that and the whole AOLserver process goes zombie. Funny is that no error messages (besides "Error:" would be output). The OpenACS postgres.so forwards PG's error message to the logs.

Collapse
Posted by Tim Butterfield on
I had a similar problem.  I was viewing the user list and tried to click on a user. Every time I did this, it would hang and ps would show nsd as defunct.

In my case, it turned out to be the Bookmark support.  It was excluded from load-data-model.sql but was included in bookmarks-defs.tcl.  My problem was fixed by commenting out this line:

    lappend ad_user_contributions_summary_proc_list [list "Bookmarks" bm_user_contributions 0]