dbTalk Databases Forums  

idle timeout issue with application

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss idle timeout issue with application in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Gould
 
Posts: n/a

Default idle timeout issue with application - 11-02-2007 , 07:43 AM






We are running ASA 9.0.2.3058 on a Windows 2003 Server. All access is via a
Win32 application running on 4 Citrix servers running Citrix Presentation
Server 4.0 as published applications, meaning no desktop.

Here is the issue. In our application, we have a internal timeout set for 1
hour of idle time. This works well for us overall. In Citrix/RDP, we
force a reset of the connection if the Citrix session is a broken for 3
minutes.

This issue is that we're not properly closing out the database connections.
If a user drops off the Citrix server for anything other than the clean
shutdown at the application idle timout or the user exits the program
normally then we are having issues.

For example, some users get impatient and think there machine might be
frozen if they get no response back for 10 seconds (we do provide front end
indicators of progress), they will just drop the connection. If there is a
drop in the connection because of a internet issue the same thing. At this
point I still have an open connection to the database which is stuck out
there in whatever state it was in before the user dropped off.

What I'm trying to do is clean up those "bad" connections. It appears that
sometimes those connections have locks and of course those don't get
released until that connection is terminated.

I changed the -ti to be 5 minutes. The -tl is set to 240 (which I believe
is seconds). My thought being that if the Citrix/application connection
dropped, then Citrix would reset the session at 3 minutes of idle time and
then at either the 5 minute mark or 10 minute mark which ever ended up being
closet based on when the last liveliness packet was sent, the connection
would be closed by the db.

The Win32 program accesses the db via ODBC. This holds the connection open
until the program terminates.

What appears to be happening now is that users idle for 5 minutes are being
dropped. I would think that if a liveliness packet is being sent every 240
seconds to validate the connection this wouldn't happen if the connection
was still open. The only time it should drop the connection is if the
physical connection from the Citrix session is down for more than 5 minutes.

Any ideas?

Best Regards,
Michael Gould


Reply With Quote
  #2  
Old   
Mark Culp
 
Posts: n/a

Default Re: idle timeout issue with application - 11-03-2007 , 08:21 AM






When determining whether a connection is "idle", the liveness packets are
ignored - i.e. only real queries from the client to the engine reset the
idle clock back to zero.

So with -ti 5 -tl 240, a client that has not sent a query to the engine
for five minutes will be consider idle and the engine will disconnect the
connection.
--
Mark Culp
SQLAnywhere Research and Development
iAnywhere Solutions Engineering
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
Michael Gould wrote:
Quote:
We are running ASA 9.0.2.3058 on a Windows 2003 Server. All access is via a
Win32 application running on 4 Citrix servers running Citrix Presentation
Server 4.0 as published applications, meaning no desktop.

Here is the issue. In our application, we have a internal timeout set for 1
hour of idle time. This works well for us overall. In Citrix/RDP, we
force a reset of the connection if the Citrix session is a broken for 3
minutes.

This issue is that we're not properly closing out the database connections.
If a user drops off the Citrix server for anything other than the clean
shutdown at the application idle timout or the user exits the program
normally then we are having issues.

For example, some users get impatient and think there machine might be
frozen if they get no response back for 10 seconds (we do provide front end
indicators of progress), they will just drop the connection. If there is a
drop in the connection because of a internet issue the same thing. At this
point I still have an open connection to the database which is stuck out
there in whatever state it was in before the user dropped off.

What I'm trying to do is clean up those "bad" connections. It appears that
sometimes those connections have locks and of course those don't get
released until that connection is terminated.

I changed the -ti to be 5 minutes. The -tl is set to 240 (which I believe
is seconds). My thought being that if the Citrix/application connection
dropped, then Citrix would reset the session at 3 minutes of idle time and
then at either the 5 minute mark or 10 minute mark which ever ended up being
closet based on when the last liveliness packet was sent, the connection
would be closed by the db.

The Win32 program accesses the db via ODBC. This holds the connection open
until the program terminates.

What appears to be happening now is that users idle for 5 minutes are being
dropped. I would think that if a liveliness packet is being sent every 240
seconds to validate the connection this wouldn't happen if the connection
was still open. The only time it should drop the connection is if the
physical connection from the Citrix session is down for more than 5 minutes.

Any ideas?

Best Regards,
Michael Gould

Reply With Quote
  #3  
Old   
Michael Gould
 
Posts: n/a

Default Re: idle timeout issue with application - 11-04-2007 , 06:11 AM



Mark,

Thanks for the clarification

Best Regards,

Michael Gould

"Mark Culp" <reply_to_newsgroups_only_please_nospam_mark.cul p (AT) iAnywhere (DOT) com>
wrote in message news:472C8400.9A62EB5C (AT) iAnywhere (DOT) com...
Quote:
When determining whether a connection is "idle", the liveness packets are
ignored - i.e. only real queries from the client to the engine reset the
idle clock back to zero.

So with -ti 5 -tl 240, a client that has not sent a query to the engine
for five minutes will be consider idle and the engine will disconnect the
connection.
--
Mark Culp
SQLAnywhere Research and Development
iAnywhere Solutions Engineering
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
Michael Gould wrote:

We are running ASA 9.0.2.3058 on a Windows 2003 Server. All access is via
a
Win32 application running on 4 Citrix servers running Citrix Presentation
Server 4.0 as published applications, meaning no desktop.

Here is the issue. In our application, we have a internal timeout set
for 1
hour of idle time. This works well for us overall. In Citrix/RDP, we
force a reset of the connection if the Citrix session is a broken for 3
minutes.

This issue is that we're not properly closing out the database
connections.
If a user drops off the Citrix server for anything other than the clean
shutdown at the application idle timout or the user exits the program
normally then we are having issues.

For example, some users get impatient and think there machine might be
frozen if they get no response back for 10 seconds (we do provide front
end
indicators of progress), they will just drop the connection. If there is
a
drop in the connection because of a internet issue the same thing. At
this
point I still have an open connection to the database which is stuck out
there in whatever state it was in before the user dropped off.

What I'm trying to do is clean up those "bad" connections. It appears
that
sometimes those connections have locks and of course those don't get
released until that connection is terminated.

I changed the -ti to be 5 minutes. The -tl is set to 240 (which I
believe
is seconds). My thought being that if the Citrix/application connection
dropped, then Citrix would reset the session at 3 minutes of idle time
and
then at either the 5 minute mark or 10 minute mark which ever ended up
being
closet based on when the last liveliness packet was sent, the connection
would be closed by the db.

The Win32 program accesses the db via ODBC. This holds the connection
open
until the program terminates.

What appears to be happening now is that users idle for 5 minutes are
being
dropped. I would think that if a liveliness packet is being sent every
240
seconds to validate the connection this wouldn't happen if the connection
was still open. The only time it should drop the connection is if the
physical connection from the Citrix session is down for more than 5
minutes.

Any ideas?

Best Regards,
Michael Gould


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.