[jboss-user] [JBoss Messaging] - Re: Reset button

jaap do-not-reply at jboss.com
Sat Oct 14 09:55:03 EDT 2006


At your service :)

JCA posts:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=91882
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=91064
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=87175
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=87807
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=61812

hmmmmm....

We solved a lot of our problems by closing the connections. You can turn logging on for this with the Debug set to true. And no warnings we receive for that anymore. In our code we open and close connections like this:

  |        Session s = null;
  |         try {
  |             s = SessionLocator.newSession();
  |             //bla bla
  |         } catch (Exception e) {
  |             l.fatal("bla more bla", e);
  |         } finally { 
  |             try {
  |                 s.close();
  |             } catch (Exception e) {}
  |         }
  | 

We also tried to check closing Resultsets (<track-statements>true</track-statements>), but that produces a lot of warnings, the reason for that is we use Hibernate (cannot find forum entry, but it is a known (non) issue).

We have these problems more or less since JBoss 3, now using 4.0.4. Hibernate vs 2 and 3.1.

mysql-ds:

  |   <local-tx-datasource>
  |     <jndi-name>Database</jndi-name>
  | 
  | <connection-url>jdbc:mysql://localhost:3306/jst_objects?characterEncoding=ISO8859-1&amp;cachePrepStmts=true&amp;jdbcCompliantTruncation=false</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |     <user-name>web</user-name>
  |     <password>1234</password>
  |     <min-pool-size>5</min-pool-size>
  |     <max-pool-size>1050</max-pool-size>
  |     <idle-timeout-minutes>5</idle-timeout-minutes>    <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>    <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.TimeoutMySQLValidConnectionChecker</valid-connection-checker-class-name>
  |     <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
  |     <metadata>
  |        <type-mapping>mySQL</type-mapping>
  |     </metadata>
  |     <attribute name="Debug">true</attribute>
  |     <track-statements>true</track-statements>
  |   </local-tx-datasource>
  | 

The database reports:

  | show processlist;
  | 
  | | 5864 | web         | localhost:57348    | jst_objects | Sleep       |  16207 | | 5865 | web         | localhost:57104    | jst_objects | Sleep       |  16279 |                                                                   
  | | 5866 | web         | localhost:42541    | jst_objects | Sleep       |  15912 |                                                                   
  | | 5875 | web         | localhost:49491    | jst_objects | Sleep       |  15806 |                                                                  
  | | 5877 | web         | localhost:37892    | jst_objects | Sleep       |  15755 |                                                                   | ......
  | 157 rows in set (0.00 sec)
  | 
  | status;
  | .....
  | Threads: 155  Questions: 33777278  Slow queries: 0  Opens: 41  Flush tables: 1  Open tables: 64  Queries per second avg: 244.696
  | 
  | 

You can see that MySQL has a lot of unused, idle connections (16207 for example means a hell of a lot more then <idle-timeout-minutes>5</idle-timeout-minutes>).

With a system load of 250 queries per second, 50 concurrent connections should be enouh.

So, IMHO, there is a lot of drivel on the forums about runaway connections in JCA. And we have problems with one heavy loaded JBossMQ queue that is stalling. The other queues are running flawless. My hunch is that the stalling MQ is causing the connections to become idle. So, i want to remove that and put in another messaging system.

Looking for replacements ActiveMQ for example seems to be a mature replacement for JBossMQ, but i believe (searching the posts) it cannot be embedded in JBoss when using MDB:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=85381

Would be JBoss Messaging be a good replacement candidate? Therefor my post.

Another solution i drivelled would indeed be to drop JCA. It is, looking at the posts and my experience, proven itchy. Itchy is no problem when the software running on it is closing connections like they should, but that is with more complex system not always the case and will always be a threat to the robustness of the system.

anonymous wrote : 
  | or at the very least post your issue to the JCA forum
  | 
Especially the JCA forum is a place where i would hesitate to post an issue. Posters often get cyberkilled there, exemplified by their supposed stupidity:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=68044
 and yet another 'too many connections' would not contribute to the many similar unanswered posts.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978324#3978324

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978324



More information about the jboss-user mailing list