Safely shutting down a Progress database

Chris Kelleher

Administrator
Staff member
<FONT face="Courier New">
FAQ - Shutting Down PROGRESS Databases
======================================


Date: Fri, 27 Jan 95 10:09:41 EST
From: mikef@bedford.progress.COM (Michael Furgal)
Message-Id: <9501271509.AA19330@shortland.bedford.progress.COM>
Subject: Shutting DB's under V6.3
X-Mailing-List: <progress-list@peg.happmis.com> archive/latest/708
Approved: progress-list@peg.happmis.com
To: progress-list@margaret.peg.happmis.com

>
> Wanted - Advice for V6.3 Proshut Command
> ----------------------------------------
>
> Question:
>
> Is it safe to use the -F option described in V7 System Admin Reference P3-27
> under V6.3? It is not documented but it is there and appears to work.
>

Yes it is safe.

As of 6.3D (I think) proshut can take the -F option to initiate
Emergency Shutdown. You can use the command:

proshut dbname -F -by

to automatically start an emergency shutdown.
For 6.3A - 6.3C you can do the following to get the same behavior:

(echo 3; echo y) | proshut dbname

The algorithm for Emergency Shutdown is as follows:

1.) Inform all users that a shutdown is occurring.
2.) Wait 10 seconds to see if the users can disconnect
themselves.
3.) Search the list of users that are still connected
and remove their process.
4.) General cleanup (remove shared memory, remove .lk file, ...)

Once emergency shutdown is complete, the database is in an inconsistant
state where there may be open transactions. The next time the database
is opened crash recovery will be performed causing any open transactions
to be backed out and will put the database into a consistant state.

Emergency shutdown is the preffered method of forcing a shutdown
of a "hung" database. A "hung" database is a database that cannot
be shutdown normally (Unconditional Shutdonw -by).

Sending the broker process a kill -9 (or any other progress process)
is NOT a good idea!! Use Emergency Shutdown instead!

>
>
> The 6.3 Documentation Bulletin states that 'Emergency Shutdown does not back
> out any transactions. It does do a normal crash recovery when you restart the
> database.' I assume that any incomplete transactions are backed out at this
> point (ie upon restart of the server). Is this correct?

Yes this is correct.

>
> Any help on this matter would be appreciated.
>
> Thanks
> Peter
>
> Peter Frederick + Voice +61-65-683234
> MC Meats Holdings Pty Ltd / \ Fax +61-65-683255
> Nambucca Heads, NSW, Australia \ / email pfred@ozemail.com.au
>

....MikeF

--
Mike Furgal | Progress Software | * ._ O * * *
Software Developer | 14 Oak Park | / //\. * *
Database Development Team | Bedford, Ma. 01730 | * \>> | * *
E-mail: mikef@progress.com | U.S.A. | * * \\ * * *

==============================================================================

Date: Sat, 8 Apr 95 17:11:54 EDT
From: mikef@bedford.progress.COM (Michael Furgal)
Message-Id: <9504082111.AA23867@japan.bedford.progress.COM>
Subject: RE: Re: Auto-Shutdown of Progress database
X-Mailing-List: <progress-list@peg.happmis.com> archive/latest/185
To: progress-list@margaret.peg.happmis.com

Here's the TRUTH about shutdown in general (unconditional as well as
emergency shutdown)

proshut dbname -by is the same as option 2 of the proshut screen.

When an Unconditional shutdown is executed, the proshut client
alerts the Progress broker that it's time to shutdown. The Progress
broker will then alert all of the process directly connected to the
database (or shared memory) to disconnect. This includes all
background processes (i.e. APW, BIW, AIW, Watchdog, ...), all
remotes servers, and all self service clients. It now becomes the
connected processes job to actually perform the disconnect. Once
all the processes are disconnected, the broker will then cleanup
(i.e. remove shared memory, remove the .lk file, ..) and exit.
The entire time that this is happening the proshut client is just
waiting for the Progress broker to exit. Once the broker is gone,
then proshut will display "Shutdown Complete" and exit.

proshut dbname -by -F is the same as option 2 of the proshut screen.

When an Emergency Shutdown is executed, the proshut client kill's the
Progress broker and performs the shutdown itself. It will first try to
do an unconditional shutdown for a short period (i.e. tell the processes
directly connected to the database to disconnect). After the short
period (about 10 seconds), if any processes are still connected, they are
killed!! Proshut will then cleanup (remove shared memory, remove the .lk
file, ...), and exit. Upon the next "open" of the database, all the
open transactions will be backed out.

The differences between the 2 options are:

1.) Emergency shutdown kills the clients, while Unconditional shutdown
only asks then to disconnect. If a client is connected to more
than 1 database, then Emergency Shutdown could cause the client to
"disappear" from the other database.

2.) Transaction backout is done during shutdown with Unconditional
shutdown. Emergency shutdown causes transaction backout to
occur the next time the database is opened.

I will be giving a presentation covering both databsse startup and
shutdown at the Progress Software WorldWide Users Conference in Orlando.
This will go into an indepth look at how the Progress database
shuts itself down. I highly recommend this presentation if you
want more detail about the shutdown process.

regards..


....Mike

+-------------------------------------------------------------------+
| The Progress Software WorldWide User's Conference is taking place |
| June 26-30 1995, in Orlando Florida, U.S.A. DON'T MISS IT! |
+-------------------------------------------------------------------+
Mike Furgal | Progress Software |
Software Developer | 14 Oak Park | __O
Database Development Team | Bedford, Ma. 01730 | _`\<,
E-mail: mikef@progress.com | U.S.A. | (*)/ (*)

> I think we are starting to revisit old ground here. Can anyone who knows
> give us the truth about exactly what proshut -F does ?, this way we can
> 'kill' this thread.
>
> I posted a script along time ago, stating that I used to use kill signals
> 15,1,9 on clients and then servers, rather than using proshut. I never had
> a problem doing this, this was at a time when we used to have trouble
> automatically bringing down the clients and servers each night.
>
> Steve Fisher
> steve.fisher@sophia.attgis.com
>
> AT&T Sophia, Nice
>

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Date: Fri, 27 Jan 1995 09:42:06 +0100
From: wvanbeek@inter.nl.net (W. van Beek)
Message-Id: <9501270842.AA29637@solair1.inter.NL.net>
To: pfred@ozemail.com.au, progress-list@margaret.peg.happmis.com
Subject: Re: Shutting DB's under V6.3

> Wanted - Advice for V6.3 Proshut Command
> ----------------------------------------
>
> Platform: SCO UNIX/MPX running on a Wyse 760
> Progress: Ver 6.3E03 4GL / Runtime

Our platform:
SCO unix + Progress 6.3E13

>
> We do unattended backups in the middle of the night since our systems
> are in constant use from 4am to 9pm. A number of proccesses are fired
> up by cron.
Like we do.
>
> 12.01am Script fired to kill off all non-root users. They get a warning
> then 5 minutes later if they are still logged in they get killed
> 'with extreme prejudice'.
>
> 12:10am Backup script started that does the following:
> Tries to shutdown servers with -by
> Checks status with proutil -C holder
> If they didn't die properly then they get 'killed with -9'
> Backup lots of stuff
> Remove any lockfiles, truncate db's, start servers

23:00 1 Shutdown servers. (-by)
2 (endles) wait for ending.
3 Copy db to other disk
4 start servers

23:15 search all clients with ps -fe|grep _progres etc.
kill -15 sleep 30 seconds (2 times)
kill -1 sleep 30 seconds.
mail result to systemmanager.

in 99.99% of all cases everything works out fine. If a user wants a long
job to be run (all night or so) he/she can perform the procedure normaly
done at 23:00 hour. Since this procedure can only run once a day then
servers will be up during the rest of the day/night.


>
> We seem to have occasional client sessions that do not want to die. This

If client has "press space bar etc etc" then you cannot get the server down
with -by

> in turn leads to unsatisfactory attempts to shutdown / kill servers.
>
> Question:
>
> Is it safe to use the -F option described in V7 System Admin Reference
Use only if nothing else helps
> P3-27
> under V6.3? It is not documented but it is there and appears to work.
>
> The 6.3 Documentation Bulletin states that 'Emergency Shutdown does not
> back
> out any transactions. It does do a normal crash recovery when you restart
> the
> database.' I assume that any incomplete transactions are backed out at
this
> point (ie upon restart of the server). Is this correct?
>
> Any help on this matter would be appreciated.
>
> Thanks
> Peter
>
> Peter Frederick + Voice +61-65-683234
> MC Meats Holdings Pty Ltd / \ Fax +61-65-683255
> Nambucca Heads, NSW, Australia \ / email pfred@ozemail.com.au

Hopes this helps.

=====================================================
Wim van Beek De Hypothekers Associatie BV.
wvanbeek@inter.NL.net 010 - 4981836
========== Internet : Pleased to mail you all ==============

</FONT f>
 
Top