|
Baylys Just practicing to pass the Turing test. |
||||||||||||||||||
|
Bounce suite.
What is bounce?A suite to control the the process of quitting and re-launching Frontier periodically. A suite to automate the save copy process for all roots
Why do I need to quit Frontier periodically?Because memory used by Frontier to make use of an object in a Guest database includes the memory required by all containing tables. And, once loaded the memory used by tables is not released until the root containing them is closed. Or, if Frontier quits. If you don't bounce Frontier, it will eventually run out of memory.
Why do I need to save copy my roots?Because in a root where objects are changed will grow inexorably and become more inefficient. Also because the save copy process is the only available technique to check the integrity of a root - and although its not 100% reliable, it's better than nothing. I personally save copy every root about once a week. I also organise my roots so that they don't contain a large number of websites and therefore make one corrupt website effect many others (corrupted roots are not always easily recoverable, or recoverable at all), but perhaps I'm just paranoid. On the other hand, 3 websites on editthispage.com (a Userland site) were irretrievably lost because of the lack of a regular root validation process.
How Bounce does a save copy.The save copy file menu command makes a "squashed" copy of a root, but you have to determine where it is made. Also, once made, Frontier carries on using the old version fo the root. The Bounce save copy process is somewhat improved. It aims to end up with Frontier using the new root, and with the old root stored in an archive folder. It is done in a way that "fails safe" - if Frontier crashes during the save, it should be able to open all roots that were open before the crash. Any necessary file switching is done at the last minute. Archived files are placed in a time stamped folder within the archive folder you designate.
How to install bounce.Download bayly.root. Place bayly.root into the apps sub-folder of your Guest databases Folder. To ensure bayly.root is opened when Frontier launches, run the script called #installer. Before you can use bounce, you must run bounce.init. Now look at the suites sub-menu of the Main menu in Frontier. Selecting bounce should add a new menu called Bounce to Frontier. Most options of bounce are configured from this menu.
Bounce Commands.To see the bounce menu choose bounce from the suite sub-menu of the Main menu.
Bounce Frontier... Asks for user confirmation and quits Frontier having started an apple script to get itself launched again. Use this when Frontier gets short of memory and you need a quick restart. Save One Root - does a bounce save copy for one root, selected by highlighting an entry within the root. Does not quit Frontier. Continues processing with the new root in use. Intended when you know a root needs compaction because of heavy usage. Save all Roots. - Does a bounce save copy for all open roots (except the log root). Does not re-open the new roots. Quits and re-launches itself after all save copies. This can be a very intensive operation, particularly if the roots haven't been save copied for a long time, or ever. If the webserver is active, bounce turns it off before starting. It also disables agents, so that scheduled activities don't interfere.
Scheduling regular bounces.If you are as paranoid as I, you will make regular save all root operations. I do it weekly. I'm not only paranoid, but lazy, so I schedule the operation for a low activity period. To so this, jump to bounce.scheduleFrontierRestart and use this script as a model for defining your own schedule.
Restarting a failed bounce.If your server crashes in the middle of a Save All Roots operation, there is a manual way to restart the process where it left off. This procedure allows you to create a folder full of backup roots that appear to be a complete snapshot of the server, when in fact they are not. If you choose to do this immediately after Frontier re-launches there is not much risk of inconsistencies, if the time interval is large and Frontier was running in the interim, its potentially a dangerous operation. Jump to bounce.saveAllRoots. Notice the last line, which reads,
The third parameter says this is a continuation. You should change the folder in the first parameter to match the archive folder - that is the folder that contains sub-folders with time-stamped names. You will be asked to confirm bounces selection of the latest backup attempt, then bounce will continue the operation omitting roots which have a backup copy in the selected sub-folder.
Bounce Options.Empty trash before bounce - What it says. The save copy process will create copies of all your roots, so you need to have space available. Close and Reopen before copy. This is a technique which frees up memory assigned to a root. A save copy is a memory intensive process, so this may help in situations where memory is tight. Rebound is installed. Rebound is a macintosh hardware device that polls a Macintosh at a user defined interval and restarts the machine if a poll fails. Frontiers save copy process is so intensive that the poll process will fail. Therefore you need to either deactivate Rebound or to increase the interval between polls. This options sets the period to 30 minutes just before a save copy. You may need to increase this number. Mail down time data. Bounce collects some key webserver values into a table in user.bounce.prebouncedata before it commences an operation that quits Frontier. When Frontier restarts it e-mails the contents of this table to the machine owner. Bounce, if idle, when memory < . If you are running Frontier in a memory constrained situation (bad idea, buy more memory) you can have Frontier watch its memory use and restart itself when memory falls below a threshold in user.bounce.prefs.lowMemLevel and there are no non-housekeeping threads active. Needs the ideltime init, so may only work on MacOs servers. Bounce if memory < . Have Frontier bounce if its memory is really low, regardless of active threads. This is marginally better than crashing the server, but a true desperation move. Giving Frontier more memory is a much better solution than turning this option on.
The bounce log.Bounce logs all its activities to a text file called bounce.txt in the logs sub-Folder of the ops sub-folder of Frontiers guest database folder. You can view this by choosing Show Bounce log from the menu.
Bounce on OS X.Jan Storms has contributed (August 2003) a version of bounce that works on OS X. It uses an auxiliary application called UserLand Frontier RestarterX. Becase of its size (540KB stuffed) and because it is only used by OS X, it must be downloaded separately from bayly.root and placed in the same folder as the Frontier application. Get Restarter here. There's no additional functionality, just that it now works on OS X. |
|||||||||||||||||