NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide

Manager Web Application
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide525644-002
5-20
Cleaning Up the NonStop SQL Session Data
Cleaning Up the NonStop SQL Session Data
Sessions saved by the NonStopSQLJDBCStore to a NonStop SQL database may
never get cleaned up and remain as orphan sessions when
The sessions are saved on an NSJSP container restart and never accessed after
the restart,
Or the seesion were backed up or swapped out to the NonStop SQL database and
not accessed again after the NSJSP container failed and was restarted.
Over time, the database may become very large.
The iTPWS_INSTALL_DIR/bin/nsjsp_cleanSessionData script enables you to
clean up the sessions that have expired prior to a specified number of days (the nDays
parameter). Run this script periodically as part of a cron job or any other administrative
process.
Example 5-15. SQL Session Data Cleanup Script
Usage: nsjsp_cleanSessionData nDays
where nDays: Number of days for which session data is to be
preserved/saved. Sessions that have expired more
than 'nDays' ago will be deleted. A value of zero (0)
will delete all the expired sessions.
Example 5-16. Using the nsjsp_cleanSessionData Script
osh> /usr/tandem/webserver/bin/nsjsp_cleanSessionData 5
Sessions that have expired at least 5 days ago will be deleted from the
NonStop™ SQL Database.