<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-2068 How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-2068 How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log</link><pubDate>Thu, 30 Jan 2020 00:21:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Current Revision posted to Appian Knowledge Base by Parmida Borhani on 1/30/2020 12:21:09 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;Appian Engines&lt;/a&gt; use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html" rel="noopener noreferrer" target="_blank"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency" rel="noopener noreferrer" target="_blank"&gt;automatically&lt;/a&gt;. This article illustrates and explains the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The remainder of the document uses the following notations and concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appian Engines: Appian engines are real-time in-memory (RAM) databases that also persist all data in a file on disk. These database files have the extension &lt;strong&gt;.kdb&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;engine_id&amp;gt;&lt;/code&gt;: This is the name of the engine associated with the checkpoint. e.g. groups, execution00.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_temporary&amp;gt;&lt;/code&gt;: This is the temporary folder where files related to an in-progress checkpoint are stored.&amp;nbsp;These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt; folder.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_archived&amp;gt;&lt;/code&gt;: This is the archived folder where historical KDB files are stored. These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt; fo&lt;span&gt;lder&lt;/span&gt;. This directory can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html" rel="noopener noreferrer" target="_blank"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_engine_gateway&amp;gt;&lt;/code&gt;: This is the directory that stores the live KDB that an engine will boot from if it is shutdown. This file should never be modified. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. e.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase 1: Queuing&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine_id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2: De-queuing&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Service Manager will de-queue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine_id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt;&amp;nbsp;KDB is created in the temporary folder associated with the engine undergoing a checkpoint. This is usually located at &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary/&amp;lt;engine_id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Phase 3: Checkpoint&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; KDB from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; KDB will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live KDB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint_id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/&amp;lt;KDB_name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4: Cleanup&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; KDB, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/*.kdb to &amp;lt;path_to_archived&amp;gt;/archived/&amp;lt;engine_id&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine_id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on&amp;nbsp;different versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, infrastructure, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-2068 How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/18</link><pubDate>Thu, 30 Jan 2020 00:20:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 18 posted to Appian Knowledge Base by Parmida Borhani on 1/30/2020 12:20:39 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;Appian Engines&lt;/a&gt; use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html" rel="noopener noreferrer" target="_blank"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency" rel="noopener noreferrer" target="_blank"&gt;automatically&lt;/a&gt;. This article illustrates and explains the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The remainder of the document uses the following notations and concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appian Engines: Appian engines are real-time in-memory (RAM) databases that also persist all data in a file on disk. These database files have the extension &lt;strong&gt;.kdb&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;engine_id&amp;gt;&lt;/code&gt;: This is the name of the engine associated with the checkpoint. e.g. groups, execution00.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_temporary&amp;gt;&lt;/code&gt;: This is the temporary folder where files related to an in-progress checkpoint are stored.&amp;nbsp;These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt; folder.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_archived&amp;gt;&lt;/code&gt;: This is the archived folder where historical KDB files are stored. These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt; fo&lt;span&gt;lder&lt;/span&gt;. This directory can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html" rel="noopener noreferrer" target="_blank"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_engine_gateway&amp;gt;&lt;/code&gt;: This is the directory that stores the live KDB that an engine will boot from if it is shutdown. This file should never be modified. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. e.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase 1: Queuing&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine_id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2: De-queuing&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Service Manager will de-queue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine_id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt;&amp;nbsp;KDB is created in the temporary folder associated with the engine undergoing a checkpoint. This is usually located at &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary/&amp;lt;engine_id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Phase 3: Checkpoint&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; KDB from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; KDB will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live KDB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint_id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/&amp;lt;KDB_name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4: Cleanup&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; KDB, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/*.kdb to &amp;lt;path_to_archived&amp;gt;/archived/&amp;lt;engine_id&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine_id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on&amp;nbsp;different versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/17</link><pubDate>Wed, 29 Jan 2020 02:23:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 17 posted to Appian Knowledge Base by Parmida Borhani on 1/29/2020 2:23:09 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;Appian Engines&lt;/a&gt; use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html" rel="noopener noreferrer" target="_blank"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency" rel="noopener noreferrer" target="_blank"&gt;automatically&lt;/a&gt;. This article illustrates and explains the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The remainder of the document uses the following notations and concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appian Engines: Appian engines are real-time in-memory (RAM) databases that also persist all data in a file on disk. These database files have the extension &lt;strong&gt;.kdb&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;engine_id&amp;gt;&lt;/code&gt;: This is the name of the engine associated with the checkpoint. e.g. groups, execution00.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_temporary&amp;gt;&lt;/code&gt;: This is the temporary folder where files related to an in-progress checkpoint are stored.&amp;nbsp;These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt; folder.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_archived&amp;gt;&lt;/code&gt;: This is the archived folder where historical KDB files are stored. These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt; fo&lt;span&gt;lder&lt;/span&gt;. This directory can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html" rel="noopener noreferrer" target="_blank"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_engine_gateway&amp;gt;&lt;/code&gt;: This is the directory that stores the live KDB that an engine will boot from if it is shutdown. This file should never be modified. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. e.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase 1: Queuing&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine_id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2: De-queuing&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Service Manager will de-queue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine_id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt;&amp;nbsp;KDB is created in the temporary folder associated with the engine undergoing a checkpoint. This is usually located at &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary/&amp;lt;engine_id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Phase 3: Checkpoint&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; KDB from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; KDB will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live KDB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint_id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/&amp;lt;KDB_name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4: Cleanup&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; KDB, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/*.kdb to &amp;lt;path_to_archived&amp;gt;/archived/&amp;lt;engine_id&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine_id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on&amp;nbsp;different versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/16</link><pubDate>Wed, 29 Jan 2020 02:22:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 16 posted to Appian Knowledge Base by Parmida Borhani on 1/29/2020 2:22:32 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;Appian Engines&lt;/a&gt; use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html" rel="noopener noreferrer" target="_blank"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency" rel="noopener noreferrer" target="_blank"&gt;automatically&lt;/a&gt;. This article illustrates and explains the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The remainder of the document uses the following notations and concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appian Engines: Appian engines are real-time in-memory (RAM) databases that also persist all data in a file on disk. These database files have the extension &lt;strong&gt;.kdb&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;engine_id&amp;gt;&lt;/code&gt;: This is the name of the engine associated with the checkpoint. e.g. groups, execution00.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_temporary&amp;gt;&lt;/code&gt;: This is the temporary folder where files related to an in-progress checkpoint are stored.&amp;nbsp;These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt; folder.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_archived&amp;gt;&lt;/code&gt;: This is the archived folder where historical KDB files are stored. These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt; fo&lt;span&gt;lder&lt;/span&gt;. This directory can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html" rel="noopener noreferrer" target="_blank"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_engine_gateway&amp;gt;&lt;/code&gt;: This is the directory that stores the live KDB that an engine will boot from if it is shutdown. This file should never be modified unless advised by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. e.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase 1: Queuing&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine_id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2: De-queuing&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Service Manager will de-queue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine_id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt;&amp;nbsp;KDB is created in the temporary folder associated with the engine undergoing a checkpoint. This is usually located at &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary/&amp;lt;engine_id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Phase 3: Checkpoint&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; KDB from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; KDB will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live KDB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint_id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/&amp;lt;KDB_name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4: Cleanup&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; KDB, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/*.kdb to &amp;lt;path_to_archived&amp;gt;/archived/&amp;lt;engine_id&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine_id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on&amp;nbsp;different versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/15</link><pubDate>Wed, 29 Jan 2020 02:22:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 15 posted to Appian Knowledge Base by Parmida Borhani on 1/29/2020 2:22:05 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;Appian Engines&lt;/a&gt; use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html" rel="noopener noreferrer" target="_blank"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency" rel="noopener noreferrer" target="_blank"&gt;automatically&lt;/a&gt;. This article illustrates and explains the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The remainder of the document uses the following notations and concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appian Engines: Appian engines are real-time in-memory (RAM) databases that also persist all data in a file on disk. These database files have the extension &lt;strong&gt;.kdb&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;engine_id&amp;gt;&lt;/code&gt;: This is the name of the engine associated with the checkpoint. e.g. groups, execution00.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_temporary&amp;gt;&lt;/code&gt;: This is the temporary folder where files related to an in-progress checkpoint are stored.&amp;nbsp;These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt; folder.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_archived&amp;gt;&lt;/code&gt;: This is the archived folder where historical KDB files are stored. These files are stored in the&amp;nbsp;&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt; &lt;code&gt;fo&lt;span&gt;lder&lt;/span&gt;&lt;/code&gt;. This directory can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html" rel="noopener noreferrer" target="_blank"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_engine_gateway&amp;gt;&lt;/code&gt;: This is the directory that stores the live KDB that an engine will boot from if it is shutdown. This file should never be modified unless advised by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. e.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase 1: Queuing&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine_id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2: De-queuing&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Service Manager will de-queue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine_id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt;&amp;nbsp;KDB is created in the temporary folder associated with the engine undergoing a checkpoint. This is usually located at &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary/&amp;lt;engine_id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Phase 3: Checkpoint&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; KDB from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; KDB will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live KDB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint_id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/&amp;lt;KDB_name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4: Cleanup&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; KDB, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/*.kdb to &amp;lt;path_to_archived&amp;gt;/archived/&amp;lt;engine_id&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine_id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on&amp;nbsp;different versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/14</link><pubDate>Tue, 28 Jan 2020 23:31:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 14 posted to Appian Knowledge Base by Tristan Newmann on 1/28/2020 11:31:01 PM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;Appian Engines&lt;/a&gt; use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html" rel="noopener noreferrer" target="_blank"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency" rel="noopener noreferrer" target="_blank"&gt;automatically&lt;/a&gt;. This article illustrates and explains the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The remainder of the document uses the following notations and concepts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appian Engines: Appian engines are real-time in-memory (RAM) databases that also persist all data in a file on disk.These database files have the extension &lt;strong&gt;.kdb&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;engine_id&amp;gt;&lt;/code&gt;: This is the name of the engine associated with the checkpoint. e.g. groups, execution00.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_temporary&amp;gt;&lt;/code&gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised by Appian Support.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_archived&amp;gt;&lt;/code&gt;: This is the archived folder where historical KDB files are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised by Appian Support. This directory can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html" rel="noopener noreferrer" target="_blank"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_engine_gateway&amp;gt;&lt;/code&gt;: This is the directory that stores the live KDB that an engine will boot from if it is shutdown. This file should never be modified unless advised by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. e.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase 1: Queuing&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine_id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2: De-queuing&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Service Manager will de-queue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine_id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt;&amp;nbsp;KDB is created in the temporary folder associated with the engine undergoing a checkpoint. This is usually located at &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary/&amp;lt;engine_id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Phase 3: Checkpoint&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; KDB from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; KDB will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live KDB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint_id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/&amp;lt;KDB_name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4: Cleanup&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; KDB, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/*.kdb to &amp;lt;path_to_archived&amp;gt;/archived/&amp;lt;engine_id&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine_id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on&amp;nbsp;different versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/13</link><pubDate>Tue, 28 Jan 2020 06:59:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 13 posted to Appian Knowledge Base by Parmida Borhani on 1/28/2020 6:59:13 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;Appian Engines&lt;/a&gt; use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html" rel="noopener noreferrer" target="_blank"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency" rel="noopener noreferrer" target="_blank"&gt;automatically&lt;/a&gt;. This article illustrates and explains the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The remainder of the document uses the following notations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;engine_id&amp;gt;&lt;/code&gt;: This is the name of the engine associated with the checkpoint. e.g. groups, execution00.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_temporary&amp;gt;&lt;/code&gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised by Appian Support.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_archived&amp;gt;&lt;/code&gt;: This is the archived folder where historical KDB files are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised by Appian Support. This directory can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html" rel="noopener noreferrer" target="_blank"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_engine_gateway&amp;gt;&lt;/code&gt;: This is the directory that stores the live KDB that an engine will boot from if it is shutdown. This file should never be modified unless advised by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. e.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase 1: Queuing&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine_id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2: De-queuing&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Service Manager will de-queue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine_id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt;&amp;nbsp;KDB is created in the temporary folder associated with the engine undergoing a checkpoint. This is usually located at &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary/&amp;lt;engine_id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Phase 3: Checkpoint&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; KDB from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; KDB will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live KDB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint_id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/&amp;lt;KDB_name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4: Cleanup&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; KDB, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/*.kdb to &amp;lt;path_to_archived&amp;gt;/archived/&amp;lt;engine_id&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine_id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on&amp;nbsp;different versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/12</link><pubDate>Tue, 28 Jan 2020 06:52:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Parmida Borhani</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 12 posted to Appian Knowledge Base by Parmida Borhani on 1/28/2020 6:52:04 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;Appian Engines&lt;/a&gt; use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html" rel="noopener noreferrer" target="_blank"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency" rel="noopener noreferrer" target="_blank"&gt;automatically&lt;/a&gt;. This article illustrates and explains the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The remainder of the document uses the following notations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;engine_id&amp;gt;&lt;/code&gt;: This is the name of the engine associated with the checkpoint. e.g. groups, execution00.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_temporary&amp;gt;&lt;/code&gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised by Appian Support.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_archived&amp;gt;&lt;/code&gt;: This is the archived folder where historical KDB files are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised by Appian Support. This directory can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html" rel="noopener noreferrer" target="_blank"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;path_to_engine_gateway&amp;gt;&lt;/code&gt;: This is the directory that stores the live KDB that an engine will boot from if it is shutdown. This file should never be modified unless advised by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. e.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase 1: Queuing&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine_id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine_id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, KDBFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2: De-queuing&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;Service Manager will de-queue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine_id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt;&amp;nbsp;KDB is created in the temporary folder associated with the engine undergoing a checkpoint. This is usually located at &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary/&amp;lt;engine_id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Phase 3: Checkpoint&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; KDB from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; KDB will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live KDB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path_to_temporary&amp;gt;/temporary/&amp;lt;engine_id&amp;gt;/&amp;lt;engine_id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/&amp;lt;KDB name&amp;gt;.KDB&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine_id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine_id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine_id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4: Cleanup&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; KDB, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving KDB image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path_to_engine_gateway&amp;gt;/gw1/*.KDB to &amp;lt;path_to_archived&amp;gt;/archived/&amp;lt;engine_id&amp;gt;/*.KDB&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine_id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine_id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on&amp;nbsp;different versions of Appian.&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/11</link><pubDate>Fri, 24 Jan 2020 04:15:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 11 posted to Appian Knowledge Base by Tristan Newmann on 1/24/2020 4:15:45 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt; kdb is created in the temporary folder associated with the engine undergoing a checkpoint. This is usually located at &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary/&amp;lt;engine id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; kdb from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; kdb will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engine id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdb name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engineid&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/*.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/10</link><pubDate>Fri, 24 Jan 2020 04:14:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 10 posted to Appian Knowledge Base by Tristan Newmann on 1/24/2020 4:14:24 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;checkpoint&lt;/code&gt;&lt;/a&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt; kdb is created in the temporary folder associated with the engine undergoing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; kdb from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; kdb will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engine id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdb name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engineid&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/*.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/9</link><pubDate>Fri, 24 Jan 2020 04:13:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 9 posted to Appian Knowledge Base by Tristan Newmann on 1/24/2020 4:13:22 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g. &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;code&gt;checkpoint&lt;/code&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt; kdb is created in the temporary folder associated with the engine undergoing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; kdb from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; kdb will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engine id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdb name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engineid&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/*.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/8</link><pubDate>Fri, 24 Jan 2020 04:02:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 8 posted to Appian Knowledge Base by Tristan Newmann on 1/24/2020 4:02:47 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g.&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;code&gt;checkpoint&lt;/code&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt; kdb is created in the temporary folder associated with the engine undergoing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; kdb from Phase 2 will be renamed to &lt;strong&gt;*.written.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; kdb will be moved into the &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/**/gw1&lt;/code&gt; folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engine id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdb name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engineid&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/*.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/*.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offset for serviceManager.transaction.&amp;lt;engine id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/7</link><pubDate>Fri, 24 Jan 2020 03:59:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 7 posted to Appian Knowledge Base by Tristan Newmann on 1/24/2020 3:59:55 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g.&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00/gw1&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;code&gt;checkpoint&lt;/code&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt; kdb is created in the temporary folder associated with the engine experiencing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; kdb from Phase 2 will be renamed to &amp;lt;kdb name&amp;gt;.written&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; kdb will be moved into the gw1 folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engine id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdb name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engineid&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/peX.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/peX.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offsetfor serviceManager.transaction.&amp;lt;engine id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/6</link><pubDate>Fri, 24 Jan 2020 03:58:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 6 posted to Appian Knowledge Base by Tristan Newmann on 1/24/2020 3:58:45 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g.&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;code&gt;checkpoint&lt;/code&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=X,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@X,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt; kdb is created in the temporary folder associated with the engine experiencing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; kdb from Phase 2 will be renamed to &amp;lt;kdb name&amp;gt;.written&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; kdb will be moved into the gw1 folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engine id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdb name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engineid&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/peX.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/peX.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offsetfor serviceManager.transaction.&amp;lt;engine id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/5</link><pubDate>Fri, 24 Jan 2020 03:56:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 5 posted to Appian Knowledge Base by Tristan Newmann on 1/24/2020 3:56:36 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g.&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;code&gt;checkpoint&lt;/code&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=316957, kdbFileIndex=437,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-0@656290,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt; kdb is created in the temporary folder associated with the engine experiencing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; kdb from Phase 2 will be renamed to &amp;lt;kdb name&amp;gt;.written&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; kdb will be moved into the gw1 folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engine id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdb name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engineid&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/peX.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/peX.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offsetfor serviceManager.transaction.&amp;lt;engine id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/4</link><pubDate>Fri, 24 Jan 2020 03:55:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 4 posted to Appian Knowledge Base by Tristan Newmann on 1/24/2020 3:55:37 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;code&gt;&lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/data/archived&lt;/code&gt;. However, this can be changed in &lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf&lt;/code&gt;.Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g.&lt;code&gt;&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00&lt;/code&gt; is associated with the execution00 engine gateway.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the order that they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=XXXX, kdbFileIndex=XXX,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-X@XXXX,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;code&gt;checkpoint&lt;/code&gt; script):&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=YYYY-MM-DDTHH:MM:SS.mmmZ,engineId=&amp;lt;engine id&amp;gt;, requestId=&amp;lt;checkpoint id&amp;gt;,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=&amp;lt;checkpoint id&amp;gt;,minTxId=316957, kdbFileIndex=437,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-0@656290,initiatingHost=&amp;lt;host&amp;gt;, executionHost=&amp;lt;host&amp;gt;}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint &amp;lt;checkpoint id&amp;gt; dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &lt;strong&gt;*.writing&lt;/strong&gt; kdb is created in the temporary folder associated with the engine experiencing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;*.writing&lt;/strong&gt; kdb from Phase 2 will be renamed to &amp;lt;kdb name&amp;gt;.written&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;*.written&lt;/strong&gt; kdb will be moved into the gw1 folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint &amp;lt;checkpoint id&amp;gt; file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written at YYYY-MM-DD HH:MM:SS.mmmZ&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpoint-watcher-&amp;lt;engine id&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engine id&amp;gt;-&amp;lt;checkpoint id&amp;gt;.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdb name&amp;gt;.kdb&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [checkpoint-watcher-&amp;lt;engineid&amp;gt;-XXX-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint &amp;lt;checkpoint id&amp;gt; for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint&amp;lt;checkpoint id&amp;gt; completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [CheckpointManager-&amp;lt;engine id&amp;gt;-X] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpoint &amp;lt;checkpoint id&amp;gt; execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark any transactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;YYYY-MM-DD HH:MM:SS.mmm[checkpointArchiver-XXX-X]INFO com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/peX.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/peX.kdb&lt;br /&gt;...&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offsetfor serviceManager.transaction.&amp;lt;engine id&amp;gt;-X from XXXX to XXXX&lt;br /&gt;YYYY-MM-DD HH:MM:SS.mmm [KomodoEventBus-XXXX] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entries for &amp;lt;engine id&amp;gt; that are an earlier offset than XXXX for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/3</link><pubDate>Thu, 23 Jan 2020 07:21:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 3 posted to Appian Knowledge Base by Tristan Newmann on 1/23/2020 7:21:10 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/19.4/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/19.4/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary.However, this can be changed in&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &amp;lt;APPIAN_HOME&amp;gt;/services/data/archived. However, this can be changed in &amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf.Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g.&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00 is associated with execution00.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the orderthat they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:06,297 [KomodoEventBus-3139] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;2020-01-2211:47:53,682 [CheckpointManager-&amp;lt;engine id&amp;gt;-0] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=2020-01-22T11:47:53.681Z,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=b6049c4c-af87-4594-88c2-354c1c6c632b,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;&amp;nbsp;2020-01-2211:47:53,689 [CheckpointManager-groups-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=2020-01-22T11:47:53.681Z,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=6c2e9683-7149-4003-b810-a4e9f075d792,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=6c2e9683-7149-4003-b810-a4e9f075d792,minTxId=259326, kdbFileIndex=436,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-0@51882&lt;br /&gt;2,initiatingHost=dev194, executionHost=dev194}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;code&gt;checkpoint&lt;/code&gt; script):&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:06,298[CheckpointManager-&amp;lt;engine id-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=2020-01-23T06:07:06.296Z,engineId=&amp;lt;engine id&amp;gt;, requestId=b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;2020-01-23 06:07:06,307[CheckpointManager-&amp;lt;engine id-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=2020-01-23T06:07:06.296Z,engineId=&amp;lt;engine id&amp;gt;, requestId=b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc,minTxId=316957, kdbFileIndex=437,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-0@656290,initiatingHost=dev194, executionHost=dev194}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:06,307 [KomodoEventBus-3115]INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;2020-01-23 06:07:06,307 [KomodoEventBus-3142] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc for &amp;lt;engine id&amp;gt;&lt;br /&gt;2020-01-2306:07:06,322 [KomodoEventBus-3115] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &amp;quot;writing&amp;quot; kdb is created in the temporary folder associated with the engine experiencing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &amp;quot;writing&amp;quot; kdb from Phase 2 will be renamed to &amp;lt;kdb name&amp;gt;.written&lt;/li&gt;
&lt;li&gt;The &amp;quot;.written&amp;quot; kdb will be moved into the gw1 folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;2020-01-2306:07:16,828 [checkpoint-watcher-&amp;lt;engine id&amp;gt;-172-1] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc.written at2020-01-23T06:07:16.828Z&lt;br /&gt;2020-01-23 06:07:16,828[checkpoint-watcher-&amp;lt;engine id&amp;gt;-172-1] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engineid&amp;gt;/&amp;lt;engine id&amp;gt;-b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdbname&amp;gt;.kdb&lt;br /&gt;2020-01-23 06:07:19,065 [checkpoint-watcher-&amp;lt;engineid&amp;gt;-172-1] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc for &amp;lt;engine id&amp;gt;&lt;br /&gt;2020-01-2306:07:19,066 [KomodoEventBus-3136] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;2020-01-2306:07:19,066 [CheckpointManager-&amp;lt;engine id&amp;gt;-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of the prior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark anytransactions that were persisted to disk in the checkpoint as ready for cleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:19,067[checkpointArchiver-&amp;lt;path to archived&amp;gt;/archived/&amp;lt;engine id&amp;gt;-171-1]INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to enginegateway&amp;gt;/gw1/pe436.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/pe436.kdb&lt;br /&gt;...&lt;br /&gt;2020-01-23 06:07:19,089 [KomodoEventBus-3128]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offsetfor serviceManager.transaction.&amp;lt;engine id&amp;gt;-0 from 630299 to 638385&lt;br /&gt;2020-01-2306:07:19,091 [KomodoEventBus-3128] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entriesfor &amp;lt;engine id&amp;gt; that are an earlier offset than 638385 for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/2</link><pubDate>Thu, 23 Jan 2020 07:20:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 2 posted to Appian Knowledge Base by Tristan Newmann on 1/23/2020 7:20:21 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the &lt;a href="https://docs.appian.com/suite/help/latest/Logging.html#service-manager" rel="noopener noreferrer" target="_blank"&gt;&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/19.4/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/19.4/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary.However, this can be changed in&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &amp;lt;APPIAN_HOME&amp;gt;/services/data/archived. However, this can be changed in &amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf.Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g.&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00 is associated with execution00.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the orderthat they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:06,297 [KomodoEventBus-3139] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;2020-01-2211:47:53,682 [CheckpointManager-&amp;lt;engine id&amp;gt;-0] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=2020-01-22T11:47:53.681Z,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=b6049c4c-af87-4594-88c2-354c1c6c632b,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;&amp;nbsp;2020-01-2211:47:53,689 [CheckpointManager-groups-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=2020-01-22T11:47:53.681Z,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=6c2e9683-7149-4003-b810-a4e9f075d792,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=6c2e9683-7149-4003-b810-a4e9f075d792,minTxId=259326, kdbFileIndex=436,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-0@51882&lt;br /&gt;2,initiatingHost=dev194, executionHost=dev194}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;code&gt;checkpoint&lt;/code&gt; script):&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:06,298[CheckpointManager-&amp;lt;engine id-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=2020-01-23T06:07:06.296Z,engineId=&amp;lt;engine id&amp;gt;, requestId=b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;2020-01-23 06:07:06,307[CheckpointManager-&amp;lt;engine id-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=2020-01-23T06:07:06.296Z,engineId=&amp;lt;engine id&amp;gt;, requestId=b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc,minTxId=316957, kdbFileIndex=437,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-0@656290,initiatingHost=dev194, executionHost=dev194}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:06,307 [KomodoEventBus-3115]INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;2020-01-23 06:07:06,307 [KomodoEventBus-3142] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc for &amp;lt;engine id&amp;gt;&lt;br /&gt;2020-01-2306:07:06,322 [KomodoEventBus-3115] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &amp;quot;writing&amp;quot; kdb is created in the temporary folder associated with the engine experiencing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &amp;quot;writing&amp;quot; kdb from Phase 2 will be renamed to &amp;lt;kdb name&amp;gt;.written&lt;/li&gt;
&lt;li&gt;The &amp;quot;.written&amp;quot; kdb will be moved into the gw1 folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;2020-01-2306:07:16,828 [checkpoint-watcher-&amp;lt;engine id&amp;gt;-172-1] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc.written at2020-01-23T06:07:16.828Z&lt;br /&gt;2020-01-23 06:07:16,828[checkpoint-watcher-&amp;lt;engine id&amp;gt;-172-1] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engineid&amp;gt;/&amp;lt;engine id&amp;gt;-b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdbname&amp;gt;.kdb&lt;br /&gt;2020-01-23 06:07:19,065 [checkpoint-watcher-&amp;lt;engineid&amp;gt;-172-1] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc for &amp;lt;engine id&amp;gt;&lt;br /&gt;2020-01-2306:07:19,066 [KomodoEventBus-3136] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;2020-01-2306:07:19,066 [CheckpointManager-&amp;lt;engine id&amp;gt;-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of theprior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark anytransactions that were persisted to disk in the checkpoint as ready forcleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:19,067[checkpointArchiver-&amp;lt;path to archived&amp;gt;/archived/&amp;lt;engine id&amp;gt;-171-1]INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to enginegateway&amp;gt;/gw1/pe436.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/pe436.kdb&lt;br /&gt;...&lt;br /&gt;2020-01-23 06:07:19,089 [KomodoEventBus-3128]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offsetfor serviceManager.transaction.&amp;lt;engine id&amp;gt;-0 from 630299 to 638385&lt;br /&gt;2020-01-2306:07:19,091 [KomodoEventBus-3128] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entriesfor &amp;lt;engine id&amp;gt; that are an earlier offset than 638385 for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item><item><title>KB-XXXX How to understand checkpointing in service_manager.log</title><link>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log/revision/1</link><pubDate>Thu, 23 Jan 2020 07:19:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:394ceb6c-89e7-4f71-be7f-eb478fe4ff32</guid><dc:creator>Tristan Newmann</dc:creator><comments>https://community.appian.com/support/w/kb/1653/kb-2068-how-to-understand-checkpointing-in-service_5f00_manager-log#comments</comments><description>Revision 1 posted to Appian Knowledge Base by Tristan Newmann on 1/23/2020 7:19:02 AM&lt;br /&gt;
&lt;h2&gt;Purpose&lt;/h2&gt;
&lt;p&gt;Illustrate and explain the process of a single engine checkpointing, and how the associated output appears in the&amp;lt;APPIAN_HOME&amp;gt;/logs/service_manager.log.&lt;/p&gt;
&lt;h2&gt;Context&lt;/h2&gt;
&lt;p&gt;The Appian Engines use a process called &lt;a href="https://docs.appian.com/suite/help/19.4/Configuring_Application_Checkpointing.html" rel="noopener noreferrer" target="_blank"&gt;&amp;quot;checkpointing&amp;quot;&lt;/a&gt; to persist data stored in the in-memory engines to disk. This is triggered either &lt;a href="https://docs.appian.com/suite/help/latest/Checkpoint_Script.html"&gt;manually&lt;/a&gt; or &lt;a href="https://docs.appian.com/suite/help/latest/Configuring_Application_Checkpointing.html#configuring-checkpointing-frequency"&gt;automatically&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Note: The remainder of the document will use the following notation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;engine id&amp;gt;: This is the name of the &lt;a href="https://docs.appian.com/suite/help/19.4/Enterprise_Architecture_Overview.html#appian-engines" rel="noopener noreferrer" target="_blank"&gt;engine&lt;/a&gt; associated with the checkpoint. E.g. groups, execution00.&lt;br /&gt;&amp;lt;path to temporary&amp;gt;: This is the temporary folder where files related to an in-progress checkpoint are stored. This is typically &amp;lt;APPIAN_HOME&amp;gt;/services/data/temporary.However, this can be changed in&amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf. Changing this file is not supported unless advised to by Appian Support.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to archived&amp;gt;: This is the archived folder where historical kdbs are stored.This is typically &amp;lt;APPIAN_HOME&amp;gt;/services/data/archived. However, this can be changed in &amp;lt;APPIAN_HOME&amp;gt;/services/conf/service_manager.conf.Changing this file is not supported unless advised to by Appian Support. This directly can be cleaned and maintained using the &lt;a href="https://docs.appian.com/suite/help/latest/CleanupArchives_Script.html"&gt;cleanupArchives script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;path to engine gateway&amp;gt;: This is the directory that stores the live kdb that an engine will boot from if it is shutdown. This file should never be modified unless advised to by Appian Support. The &lt;a href="https://docs.appian.com/suite/help/latest/Enterprise_Architecture_Overview.html#file-storage" rel="noopener noreferrer" target="_blank"&gt;exact path&lt;/a&gt; varies from engine to engine. E.g.&amp;lt;APPIAN_HOME&amp;gt;/server/process/exec/00 is associated with execution00.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Phase1:&lt;/h3&gt;
&lt;p&gt;When a checkpoint is first requested or triggered, it is placed into a queue within the Service Manager component. Checkpoints occur serially, in the orderthat they are placed into the queue. In the logs, this looks like:&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:06,297 [KomodoEventBus-3139] INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpoint &amp;lt;checkpoint id&amp;gt; requested for: &amp;lt;engine id&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Service Manager will also log output indicating the type of checkpoint that was requested, e.g. automatic or user triggered.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automatic&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;2020-01-2211:47:53,682 [CheckpointManager-&amp;lt;engine id&amp;gt;-0] INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=2020-01-22T11:47:53.681Z,engineId=&amp;lt;engine id&amp;gt;&amp;gt;,&lt;br /&gt;&amp;nbsp;requestId=b6049c4c-af87-4594-88c2-354c1c6c632b,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;&amp;nbsp;2020-01-2211:47:53,689 [CheckpointManager-groups-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventAutoCheckpointRequestedEvent{createdInstant=2020-01-22T11:47:53.681Z,engineId=&amp;lt;engine id&amp;gt;, requestId&lt;br /&gt;=6c2e9683-7149-4003-b810-a4e9f075d792,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=6c2e9683-7149-4003-b810-a4e9f075d792,minTxId=259326, kdbFileIndex=436,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-0@51882&lt;br /&gt;2,initiatingHost=dev194, executionHost=dev194}}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;User Requested&lt;/strong&gt; (using the &lt;code&gt;checkpoint&lt;/code&gt; script):&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:06,298[CheckpointManager-&amp;lt;engine id-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - HandlingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=2020-01-23T06:07:06.296Z,engineId=&amp;lt;engine id&amp;gt;, requestId=b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc,engineShuttingDown=false, checkpointContext=null}&lt;br /&gt;2020-01-23 06:07:06,307[CheckpointManager-&amp;lt;engine id-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - QueueingCheckpointRequestedEventUserCheckpointRequestedEvent{createdInstant=2020-01-23T06:07:06.296Z,engineId=&amp;lt;engine id&amp;gt;, requestId=b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc,engineShuttingDown=false,checkpointContext=CheckpointContext{checkpointId=b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc,minTxId=316957, kdbFileIndex=437,retentionMetadata=serviceManager.transaction.&amp;lt;engine id&amp;gt;-0@656290,initiatingHost=dev194, executionHost=dev194}}&lt;/pre&gt;
&lt;p&gt;As can be seen, in both of the above outputs, the &lt;code&gt;CheckpointRequestedEvent&lt;/code&gt; is handled by putting it on the checkpointing queue, to be processed.&lt;/p&gt;
&lt;h3&gt;Phase 2:&lt;/h3&gt;
&lt;p&gt;Service Manager will dequeue a checkpoint request in order to process it. This is associated with:&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:06,307 [KomodoEventBus-3115]INFO&amp;nbsp; com.appian.komodo.engine.status.CheckpointingStateProvider -Checkpoint b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc dequeued for: &amp;lt;engineid&amp;gt;&lt;br /&gt;2020-01-23 06:07:06,307 [KomodoEventBus-3142] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointWatcher - Waiting for checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc for &amp;lt;engine id&amp;gt;&lt;br /&gt;2020-01-2306:07:06,322 [KomodoEventBus-3115] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc started for &amp;lt;engine id&amp;gt;&lt;/pre&gt;
&lt;p&gt;After this output, Service Manager will be actively checkpointing the specific engine that the request was associated with. While an engine is being checkpointed, a temporary &amp;quot;writing&amp;quot; kdb is created in the temporary folder associated with the engine experiencing a checkpoint.&lt;/p&gt;
&lt;h3&gt;Phase 3:&lt;/h3&gt;
&lt;p&gt;Service Manager will complete the checkpoint operation and perform some operations on the file system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &amp;quot;writing&amp;quot; kdb from Phase 2 will be renamed to &amp;lt;kdb name&amp;gt;.written&lt;/li&gt;
&lt;li&gt;The &amp;quot;.written&amp;quot; kdb will be moved into the gw1 folder associated with the engine that underwent a checkpoint. This is the new live kdb.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These appear in the logs as:&lt;/p&gt;
&lt;pre&gt;2020-01-2306:07:16,828 [checkpoint-watcher-&amp;lt;engine id&amp;gt;-172-1] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Notified of Kimage created for checkpoint b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc file&amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engine id&amp;gt;/&amp;lt;engineid&amp;gt;-b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc.written at2020-01-23T06:07:16.828Z&lt;br /&gt;2020-01-23 06:07:16,828[checkpoint-watcher-&amp;lt;engine id&amp;gt;-172-1] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier - Moving KCheckpoint to next live: &amp;lt;path to temporary&amp;gt;/temporary/&amp;lt;engineid&amp;gt;/&amp;lt;engine id&amp;gt;-b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc.written to/&amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to engine gateway&amp;gt;/gw1/&amp;lt;kdbname&amp;gt;.kdb&lt;br /&gt;2020-01-23 06:07:19,065 [checkpoint-watcher-&amp;lt;engineid&amp;gt;-172-1] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.LocalCheckpointWatcherTask - Finishedcheckpoint b2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc for &amp;lt;engine id&amp;gt;&lt;br /&gt;2020-01-2306:07:19,066 [KomodoEventBus-3136] INFO&amp;nbsp;com.appian.komodo.engine.status.CheckpointingStateProvider - Checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc completed for &amp;lt;engine id&amp;gt;&lt;br /&gt;2020-01-2306:07:19,066 [CheckpointManager-&amp;lt;engine id&amp;gt;-0] INFO&amp;nbsp;com.appian.komodo.engine.checkpoint.CheckpointManager - Checkpointb2d6c4d0-8be9-42fd-aeaa-4e35a63da3dc execution complete&lt;/pre&gt;
&lt;h3&gt;Phase 4:&lt;/h3&gt;
&lt;p&gt;Once the checkpoint is complete Service Manager will perform cleanup of theprior &amp;quot;live&amp;quot; kdb, and will also instruct the Kafka component to mark anytransactions that were persisted to disk in the checkpoint as ready forcleanup. In the logs, this is associated with:&lt;/p&gt;
&lt;pre&gt;2020-01-23 06:07:19,067[checkpointArchiver-&amp;lt;path to archived&amp;gt;/archived/&amp;lt;engine id&amp;gt;-171-1]INFO&amp;nbsp; com.appian.komodo.engine.checkpoint.SingleGatewayCheckpointCopier -Archiving kdb image from &amp;lt;APPIAN_HOME&amp;gt;/server/&amp;lt;path to enginegateway&amp;gt;/gw1/pe436.kdb to &amp;lt;path to archived&amp;gt;/archived/&amp;lt;engineid&amp;gt;/pe436.kdb&lt;br /&gt;...&lt;br /&gt;2020-01-23 06:07:19,089 [KomodoEventBus-3128]INFO&amp;nbsp; com.appian.komodo.log.KafkaLogCleaner - Updating committed offsetfor serviceManager.transaction.&amp;lt;engine id&amp;gt;-0 from 630299 to 638385&lt;br /&gt;2020-01-2306:07:19,091 [KomodoEventBus-3128] INFO&amp;nbsp;com.appian.komodo.log.KafkaLogCleaner - Marking all transaction log entriesfor &amp;lt;engine id&amp;gt; that are an earlier offset than 638385 for deletion.&lt;/pre&gt;
&lt;h2&gt;&lt;span style="font-weight:400;"&gt;Affected Versions&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This article applies to Appian 17.3 and later. The output was captured on Appian 19.4 and may be slightly different on older / newer versions of Appian.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Last Reviewed: January 2020&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: kafka, engines, how-to, Architecture, service manager, checkpointing&lt;/div&gt;
</description></item></channel></rss>