Forum OpenACS Q&A: Aolserver cannot restart

Collapse
Posted by Peter Alberer on
Today i had a very unpleasant experience with an aolserver process hanging. aolserver is controlled by daemontools and seems to have crashed at 4am, but did not close current connections. daemontools restarted aolserver, but the restarted aolserver could not listen to port 80 because the old process was still there somehow...

ps ax showed a single [nsd] with status "DW" (that could not be killed), netstat showed a lot of connections to port 80 in status SYN_RECV. there were also still some postgres backends around.

i tried to get rid of the connections by restarting the network, taking down eth0 but nothing worked. (why is that by the way?)

did anyone else have such problems? i would be glad to hear about any experiences with something like that!

tia, peter

Collapse
Posted by Venugopal M on
Hi Peter

I use daemontools too and have not faced this problem yet.
However, while testing/development, I generally use a

killall nsd

or

killall -9 nsd

to make sure my aolserver is properly shutdown.

Ofcourse be careful using this method if you are running multiple instances of AOLServer !

cherio
venu

Collapse
Posted by Jade Rubick on
Peter, you should also check that the size of your log files aren't too big. I ran into this problem recently. You can search for the thread where we discussed it about a week ago.
Collapse
Posted by Peter Alberer on
Thanks for your tips. I am using multilog to rotate server logs based on logfile size so that should not be a problem. (and it was not, i checked that)

My (only) solution to the problem was to restart the server, nothing else seemed to help.

Collapse
Posted by hafeez bana on
Hi,

The problem could be with the location of the pid file. Check your logs to see if AOLServer could create the PID file. If it can't, restarting aolserver via nsd will not be possible.

If there is a problem there is a parameter in the config file for pointing the file to somewhere suitable (where permissions are favourable).

using daemon tools will obviate the need for the above solution as no pid file is created.

Regards,
hafeez