Modifying the cleanup frequency

If you encounter Java out-of-memory errors, or if your data/requests directory gets very large, during regular cleanup intervals, then consider automating and fine-tuning the database and data/requests directory cleanup process .

Rather than managing the job queue using the delete function from the URL API, you can automate cleanup to keep from encountering out-of-memory errors and very large amounts of data requests stored. To manage this process, Spotfire Statistics Services contains two properties to control the number of days to store data and frequency of cleanup of the database and data/requests directory.

Perform this task on the computer where Spotfire Statistics Services is installed.

Prerequisites

You must have write access to the spserver.properties file.

Procedure

  1. Stop the Spotfire Statistics Services service.
  2. Using a text editor, open the file spserver.properties from the following location.
    • Cluster: SPSERVER_SHARE/conf
    • Standalone: SPSERVER_HOME/conf
    (where SPSERVER_SHARE or SPSERVER_HOME is your Spotfire Statistics Services installation directory
  3. Find the property db.cleanup.run.interval.minutes.
    The default is 0, which means that the job queue database should grow indefinitely.
  4. Set the property db.cleanup.run.interval.minutes to an appropriate interval, considering the number of requests Spotfire Statistics Services handles.
    For example, setting db.cleanup.run.interval.minutes=2880 specifies running the cleanup every 2 days.
  5. Find the property db.cleanup.time.to.live.days.

    By default, Spotfire Statistics Services performs a database cleanup every 7 days.

  6. Set the property to db.cleanup.time.to.live.days=3, and then save and close the file.
  7. Restart the Spotfire Statistics Services service.

Result

The Spotfire Statistics Services is set to perform database cleanup at the interval specified, and cleans up any data entry older than 3 days.

What to do next

If you continue to see out-of-memory errors, then try Increasing the database memory size on the Tomcat server.