<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What is the point of setting a timeout in CAS sessions? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-point-of-setting-a-timeout-in-CAS-sessions/m-p/666420#M199387</link>
    <description>&lt;P&gt;I realise this is an older question that is not yet answered, maybe you found the answer in the meantime. Anyway here is what I believe the behaviour of this option is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The meaning of the timeout parameter is the number of seconds after which the CAS session will end itself when there are no connections to it anymore.&lt;/P&gt;
&lt;P&gt;I from a preious dicussion that a user was under the impression the timeout had an influence on the invocation process of the CAS session but that is not the case.&lt;/P&gt;
&lt;P&gt;You can easily see that and play with the option settings from a SAS Studio screen:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This here will work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas mySession sessopts=(caslib=casuser timeout=5 locale="en_US");

cas mysession disconnect;

data _null_;
 rc= sleep (3,1);
run;

cas mysession reconnect;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and this here will give an error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas mySession sessopts=(caslib=casuser timeout=5 locale="en_US");

cas mysession disconnect;

data _null_;
 rc= sleep (7,1);
run;

cas mysession reconnect;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;here is the error:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Request to RECONNECT failed for UUID 702f50ea-e1ae-6e49-a881-bd5c9732051b. Failure occurs when a disconnected CAS session 
       exceeds the timeout value and terminates, when the specified UUID is not correct or designates a session that is already 
       connected, or when authentication fails.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;simply because I deliberately disconnected from the CAS session, and that session had no other connections to it then mine. I then made my SAS sleep for a little longer then the timeout session, so by the time I wanted to reconnect to the CAS session it had ended itself.&lt;/P&gt;
&lt;P&gt;Hope this clarifies.&lt;BR /&gt;Mathias.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jul 2020 16:39:42 GMT</pubDate>
    <dc:creator>MCoopmans</dc:creator>
    <dc:date>2020-07-01T16:39:42Z</dc:date>
    <item>
      <title>What is the point of setting a timeout in CAS sessions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-point-of-setting-a-timeout-in-CAS-sessions/m-p/649141#M194573</link>
      <description>&lt;P&gt;Can someone explain why the default CAS timeout of 60 seconds needs to be increased when starting a session?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Studio 5.2 Snippets there is Create CAS Connection that simply uses&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to start the session with the default timeout of 60 seconds.&lt;/P&gt;&lt;P&gt;There is also New CAS Session that uses a timeout of 30 minutes&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I've seen other examples in papers and documentation that sets the timeout to 3600 or much higher but I don't get why this is needed.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 09:40:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-point-of-setting-a-timeout-in-CAS-sessions/m-p/649141#M194573</guid>
      <dc:creator>lancman</dc:creator>
      <dc:date>2020-05-20T09:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: What is the point of setting a timeout in CAS sessions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-point-of-setting-a-timeout-in-CAS-sessions/m-p/666420#M199387</link>
      <description>&lt;P&gt;I realise this is an older question that is not yet answered, maybe you found the answer in the meantime. Anyway here is what I believe the behaviour of this option is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The meaning of the timeout parameter is the number of seconds after which the CAS session will end itself when there are no connections to it anymore.&lt;/P&gt;
&lt;P&gt;I from a preious dicussion that a user was under the impression the timeout had an influence on the invocation process of the CAS session but that is not the case.&lt;/P&gt;
&lt;P&gt;You can easily see that and play with the option settings from a SAS Studio screen:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This here will work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas mySession sessopts=(caslib=casuser timeout=5 locale="en_US");

cas mysession disconnect;

data _null_;
 rc= sleep (3,1);
run;

cas mysession reconnect;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and this here will give an error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas mySession sessopts=(caslib=casuser timeout=5 locale="en_US");

cas mysession disconnect;

data _null_;
 rc= sleep (7,1);
run;

cas mysession reconnect;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;here is the error:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Request to RECONNECT failed for UUID 702f50ea-e1ae-6e49-a881-bd5c9732051b. Failure occurs when a disconnected CAS session 
       exceeds the timeout value and terminates, when the specified UUID is not correct or designates a session that is already 
       connected, or when authentication fails.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;simply because I deliberately disconnected from the CAS session, and that session had no other connections to it then mine. I then made my SAS sleep for a little longer then the timeout session, so by the time I wanted to reconnect to the CAS session it had ended itself.&lt;/P&gt;
&lt;P&gt;Hope this clarifies.&lt;BR /&gt;Mathias.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 16:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-point-of-setting-a-timeout-in-CAS-sessions/m-p/666420#M199387</guid>
      <dc:creator>MCoopmans</dc:creator>
      <dc:date>2020-07-01T16:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: What is the point of setting a timeout in CAS sessions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-the-point-of-setting-a-timeout-in-CAS-sessions/m-p/666425#M199388</link>
      <description>&lt;P&gt;So the CAS server knows when it can kill orphaned sessions.&amp;nbsp; That way it can free resources to serve other users/sessions.&amp;nbsp; If you know your overall process has a long step between calls to CAS session that might take longer to finish than the default time-out then you can set a longer period so that your overall process can use just the one CAS session.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 17:07:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-the-point-of-setting-a-timeout-in-CAS-sessions/m-p/666425#M199388</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-07-01T17:07:51Z</dc:date>
    </item>
  </channel>
</rss>

