Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Large Database Stack Level Too Deep #6

mislav opened this Issue Jul 27, 2009 · 3 comments


None yet
2 participants

mislav commented Jul 27, 2009

Reported by Ron Valente with mislav-will_paginate v2.3.11

466992 rows in set (0.97 sec)

>> h = Host.paginate :per_page => 15, :page => 1

SystemStackError: stack level too deep

Ruby Versions - Same Error On Both

  1. ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]
  2. ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin9]

mislav commented Jul 27, 2009

Hey Ron,

First of all, check if you have some old version of will_paginate installed:

gem search will_paginate

If there is an old version, you can either uninstall it or make sure that your application loads the correct version by following the instructions in the wiki.

Next, tell me what version of Rails (or ActiveRecord, for that matter) are you using.

Third: does this happen with other tables that aren't so huge?


mislav commented Feb 5, 2010

Closing for lack of information

januszm commented Jul 13, 2011

will_paginate kills development server when using with large (7.5 mln records) table

$ rails server
=> Booting WEBrick
=> Rails 3.0.9 application starting in development on
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-07-13 14:49:39] INFO  WEBrick 1.3.1
[2011-07-13 14:49:39] INFO  ruby 1.9.2 (2010-12-25) [x86_64-linux]
[2011-07-13 14:49:39] INFO  WEBrick::HTTPServer#start: pid=9928 port=3000


@articles = Article.paginate :page => params[:page]

article.rb model

  cattr_reader :per_page
  @@per_page = 10


<%= will_paginate @articles %>

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment