Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1794

Make connection refused exceptions TRACE

    Details

      Description

      This is just a proposal, feel free to reject.

      Default behaviour in PropsKeyedObjectPoolFactory is
      minIdle = 1
      timeBetweenEvictionRunsMillis = 2min
      i.e. after 2minutes of idle RemoteCacheManager will try to ensure at least one connection and will try to create one.
      This might be a surprise for user to get this WARNING without doing anything:

      2012-01-26 15:05:00,816 138699 WARN  [org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport] (Timer-1:) ISPN004008: Could not connect to server: test1/192.168.11.101:11222
      java.net.ConnectException: Connection refused
      	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
      	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
      	at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:100)
      	at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.<init>(TcpTransport.java:80)
      	at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:57)
      	at org.apache.commons.pool.impl.GenericKeyedObjectPool.addObject(GenericKeyedObjectPool.java:1668)
      	at org.apache.commons.pool.impl.GenericKeyedObjectPool.ensureMinIdle(GenericKeyedObjectPool.java:2038)
      	at org.apache.commons.pool.impl.GenericKeyedObjectPool.ensureMinIdle(GenericKeyedObjectPool.java:2003)
      	at org.apache.commons.pool.impl.GenericKeyedObjectPool.access$1600(GenericKeyedObjectPool.java:203)
      	at org.apache.commons.pool.impl.GenericKeyedObjectPool$Evictor.run(GenericKeyedObjectPool.java:2282)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
      

      of course it's easy to change this via "minIdle" property, I just think this is a strange default and IMHO it should be 0 instead of 1.

      WDYT?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mircea.markus Mircea Markus
                Reporter:
                mlinhard Michal Linhard
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: