# SystemStackError (stack level too deep) when creating new AR

**URL:** <https://discuss.rubyonrails.org/t/systemstackerror-stack-level-too-deep-when-creating-new-ar/1490>\
**Category:** rubyonrails-talk\
**Created:** [September 12, 2006, 11:40am UTC](https://discuss.rubyonrails.org/t/systemstackerror-stack-level-too-deep-when-creating-new-ar/1490 "2006-09-12T11:40:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arsen7](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@Arsen7](https://discuss.rubyonrails.org/u/Arsen7)\
**Post date:** [September 12, 2006, 11:40am UTC](https://discuss.rubyonrails.org/t/systemstackerror-stack-level-too-deep-when-creating-new-ar/1490/1 "2006-09-12T11:40:36Z")

</div>

Hi. I have a problem with very deep calls, causing SystemStackError.

The logs are on [Parked at Loopia](http://pastie.caboo.se/12890)

It scares me, because I don't understand it's cause, and I fear it may strike on production (in case it disappears in development 😉 )

Tests are passing without disturbance. Maybe it's because of webrick, as it creates almost half of the call-trace? I plan to use fastcgi later.

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [February 29, 2008, 4:57pm UTC](https://discuss.rubyonrails.org/t/systemstackerror-stack-level-too-deep-when-creating-new-ar/1490/2 "2008-02-29T16:57:17Z")

</div>

I got this odd error when using the console, however a restart of the console fixes it. Any thoughts?

Note that the stack level is only like 20 deep, and I have tested it and it can go (typically) to thousands deep. So something must be using up tons of stack space?

exceptionstack level too deepSystemStackError: stack level too deep &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/base.rb:1983:in `==' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1983:in `===' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/base.rb:1983:in `convert_number_column_value' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1973:in `write\_attribute' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/attribute\_methods.rb:67:in `attribute=' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1855:in `\_\_send\_\_' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/base.rb:1855:in `method_missing' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1672:in `send' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/base.rb:1672:in `attributes=' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1671:in `each' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/base.rb:1671:in `attributes=' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1505:in `initialize\_without\_callbacks' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/callbacks.rb:225:in `initialize' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:449:in `new' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/base.rb:449:in `create' &nbsp;&nbsp;from ./db/add_multiple_zips.rb:425 &nbsp;&nbsp;from ./db/add_multiple_zips.rb:415:in `each\_line' &nbsp;&nbsp;from ./db/add\_multiple\_zips.rb:415 &nbsp;&nbsp;from ./db/add\_multiple\_zips.rb:400:in `each' &nbsp;&nbsp;from ./db/add_multiple_zips.rb:400 &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:493:in `load' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/dependencies.rb:493:in `load' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:345:in `new\_constants\_in' &nbsp;&nbsp;from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/dependencies.rb:493:in `load' &nbsp;&nbsp;from (irb):25\>\>

Arsen7 wrote:
