Ubuntu system takes forever to shut down

Console reports " Waiting for Ignition Gateway to shutdown" . Takes at least 5 min to finally shut down. If the Gateway is stopped before shutdown, the system will not shut down at all. At that point you need to power down. Don’t remember this happening with an earlier build. Current build is 5739.

Any linux gurus out there know of a good way to troubleshoot this?

I’d start by looking at the wrapper.log. It is pretty verbose during shutdown, and by comparing timestamps, you might be able to identify a sub-system that is taking the lion’s share to shut down.

Does it do this every time? Do you have lots of data sitting in a datacache?

My servers also take a long time to shutdown. I never really bothered to look into it though. Ill watch the wrapper logs on shutdown tomorrow and see if I can find anything. How big is your system? Anything else unusual happening?

I am not a guru by any means, but will help where I can as many here have tried to help me. I think Kyle is very good here.

We are running 9.10 Server 64, ours will shut down as normal. I have two different setups. Our production server uses an external database server, our test server has both ignition and MySql installed on it. They are both headless with Webmin.

Lets look for differences as this info may help Kyle :prayer: :

What version of Ubuntu are you running? Is this headless or do you have a gui desktop installed on system?

Alright, My test shutdown in 15 seconds. Seems quick. I noticed if your heap usage is pretty high, it takes longer to shut down.

My system has everything installed on it (MySQL, Ignition) and is running Ubuntu Server 9.10 x64. Im not at another facility right now, but i will test next time Im there.

I watched the log file with tail -f wrapper.log, and nothing took too long, but Ill keep digging.

First of all thanks for all the input. Reviewed the wrapper.log and found no substantial evidence that there is something inhibiting the shut down. It takes approximately 1 minute to shut down when the Gateway is running and 5 seconds to shut down with the process stopped. There were some warnings in the log but not much to stall the shutdown. The warning was - “DiscoveryServer attempted disconnect() with NioIdentifier(NioIdentifier(22)) but had no corresponding channel.” All reported info in the log where evenly spaced in time.
At this point I attribute the problem to the pc not having the speed and capacity to run this program. It’s running on a dual core mobile type chip set. Basically the computer was only used for experimentation and training. I was convinced that the earlier builds did not exhibit this long of a shut down but , I could have been mistaken. Again thanks to all.

It could still be an issue. This could have nothing to do with it, but maybe try increasing your heap size, if you have enough memory. Let us know if that helps. Also, can you give me the results of free -m.

Also, does it always take this long, even if you start it, then stop it?

Ignition takes 3 seconds to shut down when stopping the process from the system monitor,
Below is the results of free -m with the Gateway started and stopped. The first set is with the Gateway stopped. Also discovered, as mentioned above, if the Gateway is stopped by using the system console, the only way to shutdown the system is by powering off the pc. Other than that it just sits there repeating every 5 seconds or so “Waiting of Ignition Gateway to shutdown”. That may be the key to a problem.

joe@joe-desktop:~$ free -m
total used free shared buffers cached
Mem: 2004 1470 533 0 305 680
-/+ buffers/cache: 484 1519
Swap: 3153 0 3153

joe@joe-desktop:~$ sudo /etc/init.d/ignition start
[sudo] password for joe:
Starting Ignition Gateway…
joe@joe-desktop:~$ free -m
total used free shared buffers cached
Mem: 2004 1854 149 0 305 717
-/+ buffers/cache: 831 1172
Swap: 3153 0 3153
joe@joe-desktop:~$

Unless Im wrong, its just trying to gracefully shutdown. In ignition.conf,

wrapper.shutdown.timeout=120 wrapper.jvm_exit.timeout=120

should define how long it should try for. Im not sure though.

According to ignition.sh. however. there is a timeout for the shutdown script. Not sure though. Could be another process in the system preventing the shutdown too.