The server encountered an error and could not complete your request.

8,347 views
Skip to first unread message

Waleed

unread,
Mar 2, 2010, 3:09:12 AM3/2/10
to Google App Engine
I'm getting this error for some requests:

The server encountered an error and could not complete your
request.<p>If the problem persists, please <A HREF="http://
code.google.com/appengine/community.html">report</A> your problem and
mention this error message and the query that caused it.

It's repeatable and the error happens every time for that specific
request I'm sending. I tested with another AE app and I get the same
problem. The request doesn't seem to be hitting my app, but fails
before that, so I can't do anything about it. When I submit the same
request with different data in the POST body, it goes through and
works well.

My request is a simple POST with a blog feed in the body of the post.
Nothing particularly unique about it. And as I mentioned earlier, it
works for most feeds, except for a few where it breaks 100% of the
time.

How can I debug this? Can anyone shed some light? App id is:
networkedblogs

Marc Provost

unread,
Mar 2, 2010, 11:29:26 AM3/2/10
to Google App Engine
Hi Waleed,

You are not seeing any errors/warnings in the logs? There are a few
possibilities here.

If the request hits your app:

* You could be hitting the 30 seconds limit (maybe because the input
is too large or something). You should see an error in the logs.
* Your code could also be raising an exception that you do not catch.
You should see an error in the logs.
* It is also possible that the return status of the request is set to
500 somehow. In this case, if your application could silently catch
the exception without logging anything. But you should be able to
debug it by logging info messages in your request handler.

If your request does not hit your app:

* You could be hitting the simultaneous requests limit. That's a
warning in the logs, but it shouldn't be reproducible every time.

Hope it helps,
Marc

Waleed Abdulla

unread,
Mar 2, 2010, 7:57:18 PM3/2/10
to google-a...@googlegroups.com
Hi Mark,
    I'm testing this on my dev app, which has no load at all, so it's not the simultaneous requests limit. Although the same problem happens on the production app for that specific request. It's a reproducible problem. This is what I see in the logs:


03-02 04:42PM 08.454 /api/pshb?bid=363429&source=ppp&hub=http%3A%2F%2Fdev.networkedblogs.com%2F&topic=http%3A%2F%2Fchaoswrappedinchocolate-coveredgrins.blogspot.com%2Ffeeds%2Fposts%2Fdefault&sig=6aed0a71ee0d7573fe6fc37a7f40ac6f5f27071f 500 40097ms 8cpu_ms 8api_cpu_ms 0kb NetworkedBlogs,gzip(gfe),gzip(gfe)

173.203.209.168 - - [02/Mar/2010:16:42:48 -0800] "POST /api/pshb?bid=363429&source=ppp&hub=http%3A%2F%2Fdev.networkedblogs.com%2F&topic=http%3A%2F%2Fchaoswrappedinchocolate-coveredgrins.blogspot.com%2Ffeeds%2Fposts%2Fdefault&sig=6aed0a71ee0d7573fe6fc37f7f40ac6f5f27071f HTTP/1.1" 500 0 - "NetworkedBlogs,gzip(gfe),gzip(gfe)"


    I have a logging.info() statement right at the start of the app as follows:

def main():
    logging.info("processing request")
    wsgiref.handlers.CGIHandler().run(application)

    But I don't see that info message in the log, so I'm taking that to mean that the execution is not hitting my app. I don't see any other details in the log other than what I lited above. The size of the POST body I'm sending is 139836 bytes, which is not that big. 

    Any other ideas? 


Regards,
Waleed




--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.


Waleed Abdulla

unread,
Mar 5, 2010, 1:49:17 AM3/5/10
to google-a...@googlegroups.com
I might have more information after a lot of testing. It seems that if an internal error happens while processing the request on the App Engine, then that process is killed and none of the log messages are recorded. Can someone from Google confirm this? 

That might explain why I don't see any of the my logging.info() messages, which led me to think that that request is not hitting my app. Anyone else experienced this?

Waleed

Waleed Abdulla

unread,
Mar 6, 2010, 7:06:55 PM3/6/10
to google-a...@googlegroups.com
I think I know what's happening now, so I'm sharing it for everyone's benefit. I was using the feedparser library to parse a feed, and that got into some sort of infinite loop. What worries me, though, is the fact that the App Engine didn't log any information from any of the logging.info() messages that executed before reaching the infinite loop, which made it really hard to find out what was going on. On localhost, the logging happens even if the process dies eventually, but on the live app engine that doesn't seem to be the case. 

Waleed
Reply all
Reply to author
Forward
0 new messages