Forum: Ruby on Rails NoMemoryError

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John S. (Guest)
on 2006-04-19 02:05
(Received via mailing list)
I am using the Openbase adapter and have had a similar glitch here
and there, but after I go into production I consistently get an error
on one page.

ActionView::TemplateError (NoMemoryError: failed to allocate memory:
SELECT * FROM ...

I cannot track down the exact location of the error, but the
production log says it was around:
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/
active_record/connection_adapters/abstract_adapter.rb:120:in `log'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/
active_record/connection_adapters/openbase_adapter.rb:152:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/
active_record/connection_adapters/openbase_adapter.rb:222:in `select'

The development WEBrick spits this out occasionally:
ruby(3306,0xa000ed98) malloc: *** error for object 0x219ab00: pointer
being reallocated was not allocated
ruby(3306,0xa000ed98) malloc: *** set a breakpoint in szone_error to
debug
ruby(3306,0xa000ed98) malloc: *** error for object 0x219ab00: pointer
being reallocated was not allocated
ruby(3306,0xa000ed98) malloc: *** set a breakpoint in szone_error to
debug
/usr/local/lib/ruby/1.8/yaml.rb:380: [BUG] Bus Error
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]

Are these ruby glitches or something in the Openbase connection? Any
tips on debugging this problem?

-John

--
John S.
Computing Staff - Webmaster
Kavli Institute for Theoretical Physics
University of California, Santa Barbara
removed_email_address@domain.invalid
(805) 893-6307
Gavin M. (Guest)
on 2008-11-08 18:03
John S. wrote:
> I am using the Openbase adapter and have had a similar glitch here
> and there, but after I go into production I consistently get an error
> on one page.
>
> ActionView::TemplateError (NoMemoryError: failed to allocate memory:
> SELECT * FROM ...
>
> I cannot track down the exact location of the error, but the
> production log says it was around:
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/
> active_record/connection_adapters/abstract_adapter.rb:120:in `log'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/
> active_record/connection_adapters/openbase_adapter.rb:152:in `execute'
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/
> active_record/connection_adapters/openbase_adapter.rb:222:in `select'
>
> The development WEBrick spits this out occasionally:
> ruby(3306,0xa000ed98) malloc: *** error for object 0x219ab00: pointer
> being reallocated was not allocated
> ruby(3306,0xa000ed98) malloc: *** set a breakpoint in szone_error to
> debug
> ruby(3306,0xa000ed98) malloc: *** error for object 0x219ab00: pointer
> being reallocated was not allocated
> ruby(3306,0xa000ed98) malloc: *** set a breakpoint in szone_error to
> debug
> /usr/local/lib/ruby/1.8/yaml.rb:380: [BUG] Bus Error
> ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]
>
> Are these ruby glitches or something in the Openbase connection? Any
> tips on debugging this problem?
>
> -John
>
> --
> John S.
> Computing Staff - Webmaster
> Kavli Institute for Theoretical Physics
> University of California, Santa Barbara
> removed_email_address@domain.invalid
> (805) 893-6307


John - I notice you had this issue a couple of years ago.
Do you have any more experience with this problem now?

I had an app which I was close to completing. I ran my functional tests
and the terminal window completely froze.
Eventually I had to reboot.

After doing so I couldnt get the app to run again so I decided to take
this oppourtunity to quickly rebuild the app. There were a couple of
changes I wanted to make to the models, nothing major, just changing the
max length of fields etc.

When I copied over the tests from the previous app to the new app and
ran them
I expected to see a few errors reflecting my changes but instead the
whole app freezes. I can only run three or four tests at a time or I get
this message:

ruby(3339) malloc: *** vm_allocate(size=1069056) failed (error code=3)
ruby(3339) malloc: *** error: can't allocate region
ruby(3339) malloc: *** set a breakpoint in szone_error to debug
ruby(3339) malloc: *** vm_allocate(size=1069056) failed (error code=3)
ruby(3339) malloc: *** error: can't allocate region
ruby(3339) malloc: *** set a breakpoint in szone_error to debug
ruby(3339) malloc: *** vm_allocate(size=1069056) failed (error code=3)
ruby(3339) malloc: *** error: can't allocate region
ruby(3339) malloc: *** set a breakpoint in szone_error to debug
ruby(3339) malloc: *** vm_allocate(size=1069056) failed (error code=3)
ruby(3339) malloc: *** error: can't allocate region
ruby(3339) malloc: *** set a breakpoint in szone_error to debug
[FATAL] failed to allocate memory
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -Ilib:test
"/usr/local...]


Any ideas on where the problem could be?

thanks
Gavin
This topic is locked and can not be replied to.