GAE + recursion limit

M

Maciej

Hi,
I'm writing a small translator using pyparsing library v1.5.2
(http://pyparsing.wikispaces.com/) and I'm using it both from command
line
and on Google App Engine. Recently I checked one of my samples which
runs
perfect from CLI against GAE and it throws me "RuntimeError 'maximum
recursion
depth exceeded'".
I did some investigation and found out that recursion
limit is the same locally and inside GA (1000). I've also tested it
locally decreasing this limit to 900 but the error didn't happen.
The problem itself rises inside pyparsing lib, line 995.

Does anyone have any clue what that might be?
Why the problem is on GAE (even when run locally), when command line
run works just fine (even with recursion limit decreased)?
Thanks in advance for any help.

Soltys
 
D

David Cournapeau

Does anyone have any clue what that might be?
Why the problem is on GAE (even when run locally), when command line
run works just fine (even with recursion limit decreased)?
Thanks in advance for any help.

Most likely google runs a customized python, with different settings
to avoid requests to take too long. I doubt there is much you can do
for this problem, but you should ask on GAE group.

David
 
P

Paul McGuire

Does anyone have any clue what that might be?
Why the problem is on GAE (even when run locally), when command line
run works just fine (even with recursion limit decreased)?

Can't explain why you see different behavior on GAE vs. local, but it
is unusual for a "small" translator to flirt with recursion limit. I
don't usually see parsers come close to this with fewer than 40 or 50
sub-expressions. You may have some left-recursion going on. Can you
post your translator somewhere, perhaps on pastebin, or on the
pyparsing wiki Discussion page (pyparsing.wikispaces.com)?

-- Paul
 
S

Soltys

Can't explain why you see different behavior onGAEvs. local, but it
is unusual for a "small" translator to flirt withrecursionlimit.  I
don't usually see parsers come close to this with fewer than 40 or 50
sub-expressions.  You may have some left-recursiongoing on.  Can you
post your translator somewhere, perhaps on pastebin, or on the
pyparsing wiki Discussion page (pyparsing.wikispaces.com)?

-- Paul

@David, thanks for the advice, I did ask on GAE list, id not get
answer till now though.

@Paul, I think I solved it. I did extensive test during weekend and
it
appears that my regular translator almost reaches 1000 recursion
limit.
Probably the last time I've tried to increase the recursion limit for
GAE
app I did it in the wrong place. (For future, if you'd like to do it,
the best
and working is to set that right before call to
run_wsgi_app(application)).
The only think that remains is, I need to review the grammar and how
processing
happens that I reach that limit with GAE.

Thanks guys,
Soltys
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top