Forum OpenACS Q&A: multiple postmaster processes and stuff

I'm running OpenACS on FreeBSD 4.1.1.  I've had it up for a week or
more now and it was relatively easy to get going.  But now is when all
the questions start to bombard me.
When I boot the machine, I have it set to start postmaster (using a
script that calls pg_ctl -- this is automatically installed by the
FreeBSD port) and aolserver (also with a script supplied by the
port).  What happens is that I end up with two postmaster processes at
boot time, and my web site does not come up when I try to connect.
But if I kill and restart nsd it does work.
Why two postmasters?  I understand there should only be one.  But what
is even weirder is that with time, more are spawned.  At the present
time I have four postmasters running.  About half an hour ago I killed
and restarted postmaster.  When I did that I only had one running.
And now four?
Collapse
Posted by Roberto Mello on
PostgreSQL will spawn a new backend for each connection. So you'll have the main backend and one for each connection AOLserver makes to PG.

You should have only one at boot, but if AOLserver starts right after PG, then it'll make a connection and a new backend will come up.

Collapse
Posted by Don Baccus on
Are you sure you have multiple postmasters, and not backends (postgresinstances?)The postmaster won't start up if it detects another postmasterlistening on the same port (it uses lock files to do the detection),and unless you've specified different ports in your various scriptspostmaster will always try to listen on port 5432.It is normal to have multiple backends, the job of the postmaster isto control them.
Collapse
Posted by Robert Schlaff on
I'm running on Red Hat 6.1. When I start up OpenACS I have 4 nsd processes running. However, if I hit refresh a bunch of times in rapid sucession I'll get more nsd processes that don't seem to die until I restart the server. Is there anything that I can do about this?
Collapse
Posted by Dan Wickstrom on
That's normal for linux.  What you're seeing is multiple threads of the nsd process.  If however, you were running on solaris,  you would only see one process, even though nsd would be running multiple threads.  The difference has to do with the difference in the threads implementation between linux and solaris.