I''m trying to figure out why I''m getting a stack level too deep error. I have controller which parses xml (about 1400 lines) and ingests it into mysql. First I was getting a system stack error every time, but then I found the ulimit -s command which allows me to raise it from 8mb to 64mb. That solved the problem I thought, But now, I can parse the xml once, but when I do it for a second time, I get the stack level too deep error. If I quit the server (mongrel) and restart it using the script/server call, something resets and lets me do the xml parsing once again. But only once. is something getting clogged up? Do I need to clear the stack level somehow? It''s not an infinite loop, just a long xml file. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 7/13/07, Davis Kitchel <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m trying to figure out why I''m getting a stack level too deep error. > I have controller which parses xml (about 1400 lines) and ingests it > into mysql. First I was getting a system stack error every time, but > then I found the ulimit -s command which allows me to raise it from 8mb > to 64mb. That solved the problem I thought, > > > But now, I can parse the xml once, but when I do it for a second time, I > get the stack level too deep error. If I quit the server (mongrel) and > restart it using the script/server call, something resets and lets me do > the xml parsing once again. But only once. > > > is something getting clogged up? Do I need to clear the stack level > somehow? > > It''s not an infinite loop, just a long xml file.Sounds like you have something, maybe a variable, that references itself causing an infinite recursion? Maybe it gets defined the first time around, so it''s not recursive until the second time? Just a guess. Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
snacktime wrote:> On 7/13/07, Davis Kitchel <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> restart it using the script/server call, something resets and lets me do >> the xml parsing once again. But only once. >> >> >> is something getting clogged up? Do I need to clear the stack level >> somehow? >> >> It''s not an infinite loop, just a long xml file. > > Sounds like you have something, maybe a variable, that references > itself causing an infinite recursion? Maybe it gets defined the first > time around, so it''s not recursive until the second time? Just a > guess. > > ChrisNope, that''s not it. If I take out the @database.save line which creates the sql insert statements, I can run it as many times as I like no problem. Somehow 1400 sql insert statements brings rails to it''s knees and it cant recover without a restart. This can''t be true? There must be a solution? Rails must be able to handle this? No? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Strangely enough I got that error in an app with - in a foldername and then changed to _ and the error did go away. 2007/7/13, Davis Kitchel <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > I''m trying to figure out why I''m getting a stack level too deep error. > I have controller which parses xml (about 1400 lines) and ingests it > into mysql. First I was getting a system stack error every time, but > then I found the ulimit -s command which allows me to raise it from 8mb > to 64mb. That solved the problem I thought, > > > But now, I can parse the xml once, but when I do it for a second time, I > get the stack level too deep error. If I quit the server (mongrel) and > restart it using the script/server call, something resets and lets me do > the xml parsing once again. But only once. > > > is something getting clogged up? Do I need to clear the stack level > somehow? > > It''s not an infinite loop, just a long xml file. > > -- > Posted via http://www.ruby-forum.com/. > > > >-- ---------------------------------------------------- Andreas Kviby Telefon 070-352 66 76 E-post akviby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Reasonably Related Threads
- Call for samples: Please help us build a Samba AD performance measuring tool
- Using 'dummy.ups' for a real application, not just testing...
- stack level too deep
- stack level too deep error : Pulling my hairs out
- puppetd: err: Got an uncaught exception of type SystemStackError: stack level too deep