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.
On 7/13/07, Davis K. [email protected] 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.
Chris
snacktime wrote:
On 7/13/07, Davis K. [email protected] 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.
Chris
Nope, 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?
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 K. [email protected]:
restart it using the script/server call, something resets and lets me do
–
Andreas Kviby
Telefon 070-352 66 76
E-post [email protected]