Lifetime Management

Automatic Clean Up

In order to maintain its memory use, the JetStream server cleans up unused objects. This process cleans up the following objects once they have expired:

Object Expiration Policy
Transfers 48 hours after the transfer has completed (or failed).
Manifests 48 hours after creation unless a Transfer or Shared link still refers to it.
Shared links Once it’s time limit, as set in createSharedToken(), has been reached.

By default, clean up process runs hourly, removing objects that have been unused or expired for 48 hours. The clean up interval and object expiration time limit can be adjusted using the updateGarbageCollectSettings() API function. Clean up can be triggered instantly using the garbageCollect() API function.

The server’s current settings can be read from Garbage Collection Structure from the getServerInfo() API function.

Persistence

Some objects are preserved across restarts of the server, so long as a persistent state directory is specified (the server is started with --persistent-state-dir):

Object Storage Policy
Destinations Stored unless --persistent-destinations is set to false.
Transfers Stored unless --persistent-transfers is set to false.
Manifests Stored if referenced by a Transfer or Shared link.
Shared links Always stored.

These objects will be removed from persistent storage once they are deleted (either explicitly or via Automatic Clean Up).

Note

On multi-user Windows systems, if not using the default service settings, the Act as part of the operating system (SeTcbPrivilege) right may be required.