Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Connections Issue

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Issue:
======
If a particular connection is taking longer time (hanging for a while, let us say 3sec), I need to identify the situation and terminate this connection to the database proceede with further activities...

Understanding:
==============
I knew that there are connection parameter settings in Websphere (like ConnectionTimeout, Max Connections, Min Connections, Reap Time, Unused Timeout and Aged Timeout) which are not useful to determine/satisfy the need.

Current Settings:
=================
ConnectionTimeout= 3sec
Max Connections= 50
Min Connections= 1
Reap Time= 180
Unused Timeout = 1800
Aged Timeout= 0

Somebody suggested to use Timer & TimeTask around this task (fetching connection) thread. Is there any best way (like setting in somewhere in WAS) to deal with this situation.

Above issue occured due to the fact that our application is sitting in a shared environment where one of the application caused infinite processes in a short time caused 100% CPU utilization... so all the connections to the database in 'hang' state.

Appreciate your input.
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Connection Timeout is how long a thread will wait for the connection pool to give it a connection (not how long the database transaction takes).

You are not able to kill the thread from the WAS layer............you could however create some solutions at the database layer to keep your processes from running away. As far as you transaction goes, you can set the transaction timeout at 3 seconds, but that does not mean that the thread accessing the database is going to stop processing.

-Ed
 
girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic