Opened 9 years ago

Last modified 8 years ago

#940 new defect

IZ714: Connection pool does not consider the max idle time for open connections

Reported by: rhierlmeier Owned by:
Priority: normal Milestone:
Component: hedeby Version: 1.0u5
Severity: Keywords: Sun bootstrap
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=714]

        Issue #:      714             Platform:     Sun         Reporter: rhierlmeier (rhierlmeier)
       Component:     hedeby             OS:        All
     Subcomponent:    bootstrap       Version:      1.0u5          CC:    None defined
        Status:       STARTED         Priority:     P3
      Resolution:                    Issue type:    DEFECT
                                  Target milestone: 1.0u5next
      Assigned to:    adoerr (adoerr)
      QA Contact:     adoerr
          URL:
       * Summary:     Connection pool does not consider the max idle time for open connections
   Status whiteboard:
      Attachments:


     Issue 714 blocks:
   Votes for issue 714:     Vote for this issue


   Opened: Mon Dec 21 03:05:00 -0700 2009 
------------------------


   Description

   During my long term tests I found that the SDM system closes connections to
   remote jvms too early. We defined that the connection be kept 5 minutes open.
   However if you enable logging of class com.sun.grid.grm.management.ConnectionPool
   (level FINE) you will see the following log entry very often:

   12/21/2009 10:05:58|262|.grm.management.ConnectionProxy.getConnection|I|Closing
   idle connection executor_vm@grawp[76] (0s idle)

   Connections are closed even if they are 0s idle.

   Evaluation:

   This issue has performance impact on the SDM system. A SDM jvm caches
   connections to remote jvms only for a very short time. As result very often new
   ssl connection must be established.

   Analysis:

   The problem lies in class ConnectionProxy. The method
   ConnectionProxy$ConnectionHandler#getIdleTime returns the idle time of the
   connection in milliseconds. The field ConnectionProxy#maxIdleTime defines the
   max idle time of a connection in seconds.

   In ConnectionProxy#getConnection the idle connections are closed of the
   following conditioin is true:

    handler.getIdleTime() > maxIdleTime && count > minConnectionCount

   This means the connection are only kept open for 300ms.


   Workaround:

   There is no work around possible, the issue must be fixed.

   How to test

   Write a junit test that checks that the max idle time for a connection is
   correctly considered.

   After implementing this issue the complete SDM system must be tested
   thoroughly.  Performance measurements should be done to ensure that the fix
   affects the system performance positively.


   ETC: 1PD
               ------- Additional comments from afisch Tue Jan 19 10:05:23 -0700 2010 -------
   took it

Change History (0)

Note: See TracTickets for help on using tickets.