3 Replies Latest reply on May 21, 2020 7:42 PM by Jeff D Branched from an earlier discussion.

    Re: Tableau - Persistent sessions or not with Java API

    Akshar Jamgaonkar

      Hello Brandyn Moody / siddharth vij,

       

      I am struggling with session topics for days now and I stumbled on this post. We have integrated javascript api to display dashboards.

       

      I am having a scenario where after around 20 - 30 minutes and sometime even around 5 minutes of inactivity / idle time, I see a popup displayed that says 'Internal Server error', looks like its got to do something with sessions getting timed out, as per one of the suggestions i got on the question i had posted, I created a empty div and redeem a trusted ticket every 10 minutes and load the div which contains a image received from redeeming the trusted ticket.

       

      However, i still see the same popup of internal server error after idle time(I am not able to establish yet the exact time, since its not yet clear and happens randomly between 5 to 20 minutes)

       

       

      Can you please suggest a way, I can stop the session getting timed out or showing some kind of error message to the user and reload the page. Attached is the error popup i see and also a few requests to hit-test-scene and render-tooltip-server which returns 403. Attached is the screenshot of the popup i see

       

      unexpetced_server_error.png

       

       

      Here are the similar posts i created Unexpected server error , would be really great if you can share your experience or suggest what can be done.

        • 1. Re: Tableau - Persistent sessions or not with Java API
          Rattan Singh

          Same Scenario, Any Reference or Help is Highly Appreciated.Akshar Jamgaonkar  Brandyn Moody

          • 2. Re: Tableau - Persistent sessions or not with Java API
            Brandyn Moody

            Hello Akshar and Rattan!

             

            So this looks more related to session timeouts than it does to session persistence.  And adding the JSAPI to the situation makes everything more complicated.


            The first question that tech support is going to ask, if you open a ticket about this (and I suggest you do) is:  Does this happen when you access the view using the normal process (going through the Tableau Server GUI) instead of using JSAPI to render the view?   If the answer to that is "No", then they will be unable to provide further support.  JSAPI implementations are a more advanced use of Tableau Server, and is not fully covered by Tableau Support.  They can make sure that basic JSAPI functionality works, but cannot help troubleshoot any custom code you created to display the dashboard.

             

            So for your first test, try this same scenario in a normal Tableau Server session, and lets see if we still get the same error.

             

            If you do get the same behavior in the normal Tableau Server interface, then this would most likely be related to the session idle timeout.  This is controlled by the Tableau Server configuration key "wgserver.session.idle_limit".  From the screenshot you posted, it looks like the idle timeout is set to 240 seconds, which explains why you can see this error as quickly as 5 minutes.  Information on adjusting this timeout can be found at the page ->  https://kb.tableau.com/articles/howto/changing-the-user-session-timeout

             

            It looks like someone else may have already mentioned this link, but I don't see any news about what happened when you adjusted the timeout.

             

            If you still get this behavior in the normal Tableau Server, even after adjusting the idle timeout, then I highly suggest that you open a Tableau support ticket so that we can check Tableau Server logs for the root cause of that "Unexpected Error" message.

             

             

            I hope this info helps!

            • 3. Re: Tableau - Persistent sessions or not with Java API
              Jeff D

              as per one of the suggestions i got on the question i had posted, I created a empty div and redeem a trusted ticket every 10 minutes and load the div which contains a image received from redeeming the trusted ticket.

               

              If this is a session timeout issue:

              Redeeming a trusted ticket will create a new session, but you really need to extend the life of the existing session. Change your code to request a small viz (or anything else from Tableau Server that requires a session), this will refresh the existing session.

               

              If this is not a session timeout issue (if it happens after before the timeout interval):

              Check your server logs to see if you can find the server error. Make a note of the time the failure occurred, and use the timestamp to help narrow down your search.