[rspec-devel] [ rspec-Bugs-7636 ] drbspec not managing db connections appropriately

noreply at rubyforge.org noreply at rubyforge.org
Thu Feb 8 10:23:06 EST 2007


Bugs item #7636, was opened at 2007-01-07 00:17
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7636&group_id=797

Category: runner module
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Chris Anderson (jchris)
Assigned to: Nobody (None)
Summary: drbspec not managing db connections appropriately

Initial Comment:
I'm using the rails_spec_server and drbspec spec/ - the lastest versions (gem 0.7.6) - just generated from trunk yesterday. Running drbspec spec/ works as expected for about 30 runs, and then I start getting too many client errors from Postgres (gem 0.7.1). 

The same thing happens with the spec:autotest plugin - but it is just running drbspec repeatedly, as well.


PGError in 'Given a generated source_report_spec.rb with fixtures loaded fixtures should load two SourceReports'
FATAL:  sorry, too many clients already
script/rails_spec_server:16:in `run'
script/rails_spec_server:37:

I don't know if this is a specific to Postgres, but I do know I've never seen Postgres raise a too many clients error before in all my Rails work.

Let me know if I can help with more information.

jchris :: mfdz : com 

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-02-08 15:23

Message:
Chris - is this still giving you grief w/ the current trunk and using --drb?

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-01-19 09:35

Message:
I haven't looked into this yet, but from now on you should use spec --drb instead of drbspec. I doubt it will solve the problem though.

It sounds like Rails (launched by rails_spec_server) is re-opening a new connection every time spec --drb connects to it. It could be a Rails problem. rails_spec_server essentially resets Rails in the same way as script/server in development mode.

Do you get the same problem if you run your app in development mode and hit an AR-accessing controller as well? If that's the case, it's a Rails problem.

Please try with Rails 1.2.1 and see if the problem still persists.

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-01-07 01:05

Message:
Have you had a similar experience just running 'rake spec'?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7636&group_id=797


More information about the rspec-devel mailing list