Bill Atkins
12/7/2005 10:49:00 PM
What output do you get when you run "free" in a shell?
On 12/7/05, Colin Freas <colinfreas@gmail.com> wrote:
> I'm trying to get Rails up and running using a PostgreSQL database, and
> unfortunately I'm doing this on a machine I don't administer directly.
>
> I can get Rails responding using the WEBrick server, and 'hello, world'
> pages work fine.
>
> However, after creating a database (on a seperate server) I can't seem to
> get Rails speaking to it. At first, the Postgres gem wasn't installed, but
> I had the sysadmin put that in. Now, though, I'm getting this error:
>
> Processing CraftController#new (for 141.161.18.159 at Wed Dec 07 14:32:38
> PST 2005)
> Parameters: {"action"=>"new", "controller"=>"craft"}
>
>
> NoMemoryError (failed to allocate memory):
> /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/buffer.rb:64:in
> `read'
> /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/buffer.rb:64:in
> `copy_from_stream'
> /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:41:in
> `read'
> /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:30:in
> `initialize'
> /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:29:in
> `loop'
> /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:29:in
> `initialize'
> /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0
> /lib/postgres-pr/postgres-compat.rb:23:in `new'
> /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0
> /lib/postgres-pr/postgres-compat.rb:23:in `initialize'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in
> `connect'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in
> `postgresql_connection'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/query_cache.rb:52:in
> `send'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/query_cache.rb:52:in
> `connection='
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/connection_adapters/abstract_adapter.rb:108:in
> `retrieve_connection'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:239:in
> `connection'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:246:in
> `connection'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1322:in
> `attributes_from_column_definition'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:928:in
> `initialize_without_callbacks'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/callbacks.rb:236:in
> `initialize'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:116:in
> `new'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/scaffolding.rb:116:in
> `new'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in
> `send'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in
> `perform_action_without_filters'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in
> `perform_action_without_benchmark'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in
> `perform_action_without_rescue'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in
> `measure'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in
> `perform_action_without_rescue'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in
> `perform_action'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in
> `send'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in
> `process'
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in
> `dispatch'
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in
> `handle_dispatch'
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in
> `service'
> /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
> /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
> /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'
> /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
> /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each'
> /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'
> /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:57:in
> `dispatch'
> script/server:49
>
>
> So, it looks like it's something with memory, but... I can't figure out
> what. Has anyone else run into this? I'm running against a 7.3 database,
> though, I'd heard Rails likes 8 and later, although, I'd also heard that had
> been fixed.
>
> Any help appreciated.
>
> Thanks,
> Colin Freas
>
>
--
Bill Atkins