MySQL connections timing out/being abandoned under JRuby on Rails app on Jetty?

This is probably due to the wait_timeout setting. You could try increasing it to something very large, but that assumes you have administrative access on the database server I've never used JRuby or Rails. But in "regular" Java, the way I would solve this is to use a connection pool which automatically recycles idle connections.

For example c3p0 has a maxIdleTime setting that controls this EDIT : Just for fun, I did a Google search on "activerecord idle connection" and I got a few hits. Here's one: groups.google.com/group/sinatrarb/browse... Apparently there is a method called ActiveRecord::Base. Verify_active_connections!

That you can use. I make no guarantees whatsoever about this solution :-). IANARP (I am not a Ruby programmer).

This is probably due to the wait_timeout setting. You could try increasing it to something very large, but that assumes you have administrative access on the database server. I've never used JRuby or Rails.

But in "regular" Java, the way I would solve this is to use a connection pool which automatically recycles idle connections. For example, c3p0 has a maxIdleTime setting that controls this. EDIT: Just for fun, I did a Google search on "activerecord idle connection" and I got a few hits.

Here's one: groups.google.com/group/sinatrarb/browse... Apparently there is a method called ActiveRecord::Base. Verify_active_connections! That you can use.

I make no guarantees whatsoever about this solution :-). IANARP (I am not a Ruby programmer).

Either Rails or our ActiveRecord-JDBC code should probably provide for a periodic connection ping or idle-time teardown. Connections being culled by the server is a standard case any connection pooling implementation should be able to handle. I'd say file a bug with ActiveRecord-JDBC on kenai.Com, but first ask on JRuby ML if anyone else has found a solid solution for this.

I've never used JRuby or Rails. But in "regular" Java, the way I would solve this is to use a connection pool which automatically recycles idle connections. For example, c3p0 has a maxIdleTime setting that controls this.

EDIT: Just for fun, I did a Google search on "activerecord idle connection" and I got a few hits. Apparently there is a method called ActiveRecord::Base. That you can use.

I make no guarantees whatsoever about this solution :-).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions