Periodically shutting down the application – Apple WebObjects 3.5: Serving User Manual
Page 29

Serving WebObjects
30
the number of instances you intend to run on a given machine. The result
is the amount of physical memory that should be installed on that machine.
If you can’t add that much physical memory, increase the amount of virtual
memory to cover the difference between the physical memory needed and
the physical memory you have.
You can also try to reduce the size of the application instance by limiting
the amount of state that it stores. Set the session time-out value to ensure
that sessions expire after a reasonable length of time. Shut down and restart
the application more often to reduce its size.
If you use WebObjects mainly for applications that access a database, you’ll
achieve the best performance with a dedicated database server and a
separate server for WebObjects applications.
Periodically Shutting Down the Application
The longer an application runs, the more memory it consumes. As more
memory is consumed, the server machine’s performance begins to degrade. For
this reason, you may find that performance is greatly improved if you
occasionally stop an application instance and start it again.
The Monitor application lets you specify when each application instance should
shut down. By default, WebObjects applications never shut down unless you
manually shut them down (which you can do by clicking the On/Off switch in
the Application Inspector Instance Status field).
To set up periodic application shutdown, do the following:
1. In the Application Inspector, click the More button to show the Application
Instance Inspector in the bottom frame.
2. Scroll down until you see the check box labeled Scheduling Enabled. Click
this check box.
3. Choose how the application should determine when to shut down and
restart. There are several options:
•
Application cycling
. You can have an application terminate itself at the end of a given
period of time. To set this up, choose Daily, Weekly, or one of the numerical
Hourly settings in the Application Cycling pop-up list, then, if applicable, set the
time of day at which you want the application to shut down. (You should choose
a time when a minimum number of users is trying to access the application. For
example, if all of your users are on the West Coast of North America, you can set
the application to shutdown at 2:00AM PST.)