<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Temporary (Ivy) file created by System session will not be deleted</title><link>https://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deleted</link><description>&lt;p&gt;In the documentation of Ivy &lt;a href="http://developer.axonivy.com/doc/latest/DesignerGuideHtml/ivy.ivyscript.html#ivy.ivyscript.reference.datatypes"&gt;File&lt;/a&gt; (emphasis mine)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A File object can be used to read/write temporary or persistent data. IvyScript Files are created in  a confined area that belongs to the running application. Temporary files are created in a session-specific file area and &lt;strong&gt;are automatically deleted if a session ends&lt;/strong&gt;. Temporary Files can be made persistent.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If a &lt;em&gt;temporary&lt;/em&gt; &lt;code&gt;File&lt;/code&gt; is created, it will be located at &lt;code&gt;{app}/files/sessions/{sessionId}/&lt;/code&gt;. The files then will be deleted if the session is invalidated.&lt;/p&gt;
&lt;p&gt;Unfortunately, this isn't true for &lt;em&gt;temporary&lt;/em&gt; files created by SYSTEM user. The SYSTEM user's session is always have the &lt;code&gt;id&lt;/code&gt; of &lt;code&gt;0&lt;/code&gt;, hence all files created in SYSTEM user's session will be located at &lt;code&gt;{app}/files/sessions/0/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It seems that Ivy Server will never invalidate SYSTEM user's session, thus all files located in the directory will by left there undeleted (same as &lt;em&gt;persistent&lt;/em&gt; file).&lt;/p&gt;
&lt;p&gt;I don't know whether this is a known fact as a consequence of the implementation that SYSTEM user will never be invalidated or it should be considered (somehow) as a bug?&lt;/p&gt;
&lt;p&gt;Thanks for considering my question.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deleted" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 29 Sep 2015 16:50:43 -0400</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deleted/1492</link><description>&lt;p&gt;Since version 5.0.12 and 5.1 all temporary files are deleted when you restart the engine. This is also true for the System User Session.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Tue, 29 Sep 2015 16:50:43 -0400</pubDate><guid>https://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deleted/1492</guid></item><item><title>Comment by Genzer Hawker on Reto Weiss's answer</title><link>https://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deleted#1125</link><description>&lt;p&gt;I'll contact support@soreco.ch then, thanks for the suggestion. Do you consider to update the document warning the developers to be aware of the problem raised by my question?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Genzer Hawker</dc:creator><pubDate>Fri, 16 Jan 2015 17:57:30 -0500</pubDate><guid>https://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deleted#1125</guid></item><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deleted/1122</link><description>&lt;p&gt;It is true that the SESSION User Session will never be invalidated and therefore the temporary files created within this session are never going to be deleted. &lt;/p&gt;
&lt;p&gt;The only problem with this behaviour that I can see currently is that the disk is filled with garbage and may lead sooner or later to a full disk error.&lt;/p&gt;
&lt;p&gt;At the moment we do not know any customer that this behaviour had caused a full disk error. &lt;/p&gt;
&lt;p&gt;A possible solution could be to delete the files during startup or shutdown of the Server.&lt;/p&gt;
&lt;p&gt;If it is a problem for you please report an issue to SoreConnect or per mail to support@soreco.ch&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Fri, 16 Jan 2015 13:19:21 -0500</pubDate><guid>https://answers.axonivy.com/questions/1121/temporary-ivy-file-created-by-system-session-will-not-be-deleted/1122</guid></item></channel></rss>