1. Andrew Davis
  2. PowerServer 2020 or older (Obsolete)
  3. Sunday, 5 July 2020 12:46 PM UTC

Hi, 

I think i am missing something quite simple here so hopefully someone will be able help.

What is the best approach to handling the transaction time out on powerserver web

I have an application that works perfectly, but if the user enters all their data but forgets to save, they return to desk 10 minutes realise and hit save, they are presented with a screen saying transaction timeout , which comes from powerserver , how do i deal with that in my code ? 

 

thanks as always

 

Andrew

Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 7 July 2020 01:40 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi Andrew,

PowerServer does not provide the interface to handle transaction timeout in PB code, but you can go to AEM -> Application -> Transactions -> Timeout -> [your application] page to adjust the timeout value as needed. Please note that setting the transaction timeout to "0" will disable this timeout.

Regards,
ZhaoKai

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 6 July 2020 18:03 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Are you using Oracle?

Then you can try doing this (quoting an email from a customer):

... This error is usually caused by the firewall dropping what it judges as an ‘inactive’ session.  I've added an extra parameter SQLNET.EXPIRE_TIME=1 to the sqlnet.ora files on the database servers which will be applied to any new sessions.   This parameter tells the DB to check the session after a minute which in turn causes traffic to be generated through the firewall and stops it misjudging sessions as dead.  This has worked in other ... environments that have experienced this problem...

regards

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Monday, 6 July 2020 13:38 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

You could also partition your application to have a nvo "component" do your updates.  The component could check the status of the connection.  I'm not sure if PowerServer offers connection pooling, does anyone know?  If so, you could use that.  You could also make your update component a web service that handles connecting and disconnecting on it's own.

 

Kevin

Comment
  1. Miguel Leeuwe
  2. Monday, 6 July 2020 17:59 PM UTC
Yes there is connection pooling. Can't remember what problems I had with it some years ago and therefore had to off it.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Sunday, 5 July 2020 14:15 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 4

Hi Andrew;

   What I do is use a "heartbeat" approach where any active Transaction Object uses a timing object to fire a simple DML statement to keep the transaction timeout from happening. When the "heartbeat" interval fires, it checks if there has been other DML activity with that time frame. If so, it does nothing & goes back to sleep until the next interval. If no DML activity has happened within the interval, it fires off a simple for example "Select 1 from Dummy/Dual" (configurable) to keep the transaction open.

  You can see the code & watch it in action in the STD Framework "OrderEntry" demo App...

https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry

This approach works for both native PB Apps and PS Web & Mobile Apps as well. It covers both the DBMS timeout and PS Session timeout issues as well.

HTH

Regards ... Chris

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Sunday, 5 July 2020 13:10 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 5

it sounds like you have an open database transaction while waiting for user input?  If that, you need to recode your logic to never have an open transaction while waiting for the user to do something.

 

Or is this a session timeout?  If it is a session timeout then you can make it longer. But i think the default is a lot longer than 10 minutes

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.