# Fixtures Max Size? SystemStackError: stack level too deep

**URL:** <https://www.ruby-forum.com/t/fixtures-max-size-systemstackerror-stack-level-too-deep/98778>\
**Category:** Rails\
**Created:** [July 18, 2006, 3:32am UTC](https://www.ruby-forum.com/t/fixtures-max-size-systemstackerror-stack-level-too-deep/98778 "2006-07-18T03:32:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 18, 2006, 3:32am UTC](https://www.ruby-forum.com/t/fixtures-max-size-systemstackerror-stack-level-too-deep/98778/1 "2006-07-18T03:32:00Z")

</div>

Hello,

I have a table of zipcodes that I am using in my application, so there  
are approximately 50,000 rows in this table. I have dumped the table to  
a fixture yaml file to represent this data, but when I try to load it, I  
get this error: SystemStackError: stack level too deep

Is there a max size allowed for a fixture file…?

Here is the --trace output:  
rake db:fixtures:load --trace  
\*\* Invoke db:fixtures:load (first\_time)  
\*\* Invoke environment (first\_time)  
\*\* Execute environment  
\*\* Execute db:fixtures:load  
rake aborted!  
a YAML error occured parsing test/fixtures/zipcodes.yml. Please note  
that YAML must be consistently indented using spaces. Tabs are not  
allowed. Please have a look at [http://www.yaml.org/faq.html](http://www.yaml.org/faq.html)  
The exact error was:  
SystemStackError: stack level too deep  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active\_record/fixtures.rb:311:in  
`read_fixture_files' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/fixtures.rb:279:in `initialize’  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active\_record/fixtures.rb:251:in  
`create_fixtures' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/fixtures.rb:250:in `create\_fixtures’  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active\_record/base.rb:794:in  
`silence' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/fixtures.rb:248:in `create\_fixtures’  
/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/tasks/databases.rake:14  
/usr/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/tasks/databases.rake:13  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:232:in `execute’  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:202:in `invoke' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize’  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:195:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1719:in `run’  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1719:in `run’  
/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/bin/rake:7  
/usr/bin/rake:18

Any help would be greatly appreciated.  
Thank you.  
\_\_  
Donnie Jones

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 25, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/fixtures-max-size-systemstackerror-stack-level-too-deep/98778/2 "2007-09-25T22:39:56Z")

</div>

I’m sure its too late for you, but if anyone else has this problem, one  
solution is to increase the max stacksize you’ll allow your process. If  
you’re running bash, you can use ulimit like this:

# check your current stack size

ulimit -s

# set your current stack size

ulimit -s 16384

I doubled my stack size to 16K, and was able to load up 33K rows of  
data, with about 200b of data each.
