Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7681799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:25:25+00:00 2026-05-31T18:25:25+00:00

I have a 3.0.7 app using active scaffold from github vhochstein/master. I am using

  • 0

I have a 3.0.7 app using active scaffold from github vhochstein/master. I am using the 3.x compatible version which can be used as a vendor/plugin, rather than requiring gem-installation.

In production it hits ActionView::Template::Error (stack level too deep):.

beaumont@edouard:~/beaumont/current$ script/rails server -p 4000
ActionView::Template::Error (stack level too deep):
    8:  depth = Kernel.caller.count
    9:  logger.info "pagination: #{@page} #{depth}" 
    10: %>
    11:     <%= render :partial => 'list_pagination_links', :locals => { :current_page => @page } if @page.pager.infinite? || @page.pager.number_of_pages > 1 %>
    12:   </div>
    13:   <br clear="both" /><%# a hack for the Rico Corner problem %>
    14: </div>

I started by looking for some recursion in my code, and then for cycle in my data model that was screwing up AS. It happened first with mod_passenger, but it also occurs with script/rails server running logged into the server. (This is my beta test machine)

It always dies in Rendered vendor/plugins/active_scaffold/frontends/default/views/_list_pagination.html.erb(144.3ms 157).
I hacked ActionView to log the Kernel.caller.count so that I could see if a stack was growing and growing but I don’t see this. I do see stack depths as high as 180.
It doesn’t seem matter if I ulimit -s the stack bigger before starting rails, but maybe something ulimits the stack back again.

In _list_pagination.html.erb, it calls list_pagination_links. If I comment out that calls, then things do not fail. I tried making list_pagination_links do nothing (having not code in it!), but it still died at that render call. I wonder if it’s in the render code itself that the stack is either going recursive, or just something too big.

This does not happen on my laptop (debian sequeeze, 32-bit) in development mode, but does happen on my beta production machine (XEN VM, 32-bit, debian squeeze). It did occur on my laptop at times, but not in a repeatable fashion, and restarting rails “solved” the problems.
I haven’t tried production mode on my laptop yet, and I also suspect that it may be data dependent!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:25:26+00:00Added an answer on May 31, 2026 at 6:25 pm

    A desperate debugging method useful for these cases that I discovered when dealing with the exact same problem is the Kernel’s set_trace_func method.

    It basically sets a method to be called after each interpreter “action”. If tou use this to print some info, then it can get pretty verbose, your program becomes annoyingly slow, but you can see exactly what’s going on. And if it’s really an infinite recursion, then you would see the name of the function that misbehaved fill your screen in a second.

    An example of use in your case would be:

     <% set_trace_func proc { |event, file, line, id, binding, classname|
            printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname
          } %>
    <%= render :partial => 'list_pagination_links', :locals => { :current_page => @page } if @page.pager.infinite? || @page.pager.number_of_pages > 1 %>
    <% set_trace_func nil # disables tracing%>
    

    Link to the set_trace_func doc

    ps: I know that this is not an answer in its real sense, but it was too long to post as a comment

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using active admin for my rails app. I have a customer model which
I have an app using the ADO.NET entity framework (the VS2008 version, not the
I have an App using UITableViews and fetching data from a server. I am
I have managed to run a basic rails app1 on App Engine using: http://gist.github.com/268192
In my app I have a background task (using AsyncTask) that downloads stuff from
I have an android app which connects to a server using a socket connection
Possible Duplicate: Error loading Active Record gem with sinatra app using RVM I have
I have an app using PHP and the PayPal API. The basic way it
I have an app using a ListView as a main screen. Each row displays
I have an app using SQLite3. It's running pretty well, but I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.