[google-appengine] Re: Random HTTP 500 errors

2009-08-31 Thread vp

Can anyone from Google give me an update on this issue. Right now my
app is hovering at 1 Request/Second with an error rate of .5 Errors/
Second. As i have mentioned earlier, 99% of these errors clearly say
...500 10096ms 0cpu_ms 0kb..., which from what i can understand
shows the request never gets to the actual request handler code.


Thanks
-V
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Random HTTP 500 errors

2009-08-29 Thread vp

Right now almost 50% of pages in my app just fail to load. Here are
the stats from my app

http://tmpimages.s3.amazonaws.com/app_errors.jpg

If i click on each error link, it gives a picture similar to:

http://tmpimages.s3.amazonaws.com/request_log_1.jpg

As you can see, for reach request that fails with HTTP 500, the CPU
usage is 0cpu_ms. This 0 cpu usage count clearly shows that requests
are not hitting the app, instead getting lost somewhere on the
appengine app server.

I think Google AppEngine team really needs to give answers here as to
why an app will give errors 50% of the time. I have been already
updating this thread for 1 month and 2 days, without any real solution
for this problem.

-V
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: DownloadError: ApplicationError: 2

2009-08-22 Thread vp

Try with urllib2 and use urllib2's exception handling to catch the
error.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: deserialize xml

2009-08-22 Thread vp

I think it is easier and faster to work with json instead of xml. For
flick api, you can change response to json easily:
http://www.flickr.com/services/api/response.json.html

As for how to process json in your app:

from django.utils import simplejson
from google.appengine.api import urlfetch

url = 'your flickr url'
try:
  response = urlfetch.fetch(url)
  result = simplejson.loads(content, 'iso8859-1')
except Exception, e:
  logging.error('ah man')
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Random HTTP 500 errors

2009-08-22 Thread vp

Nick, did you get a chance to look into my email? Let me know if i can
add any additional debugging somewhere...

Thanks
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: DownloadError: ApplicationError: 2

2009-08-22 Thread vp

From the web - http://docs.python.org/howto/urllib2.html :

req = urllib2.Request('http://www.python.org/fish.html')
try:
urllib2.urlopen(req)
except HTTPError, e:
   print e.code
   print e.read()



--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: DownloadError: ApplicationError: 2

2009-08-22 Thread vp

Ah getting the same error.

On Aug 22, 11:34 pm, vp vivpu...@gmail.com wrote:
 Also - from urllib2 import Request, urlopen, URLError, HTTPError
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Source-Code Version Control

2009-08-21 Thread vp

You can try unfuddle.com for hosted SVN.

-V
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to inherit from a template of a template?

2009-08-21 Thread vp

Let's assume the following template folders and files in case you are
Twitter developer:
/layout/base.html
/layout/header.html
/layout/footer.html
/shared/tweetSingle.html
/shared/pagination.html
/tweets/tweets.html

Below is the content for each file:

tweets.html

{% extends ../layout/base.html %}
{% block tweets %}
{% for tweet in tweets %}
{% include ../shared/tweetSingle.html %}
{% endfor %}
{% include ../shared/pagination.html %}
{% endblock %}




base.html

{% include ../layout/header.html %}
{% block tweets %}{% endblock %}
{% include ../layout/footer.html %}



header.html

html
head
/head
body



footer.html

/body
/html



tweetSingle.html

div{{ tweet.content }}/div



pagination.html

div
span style=float:righta href{{ LINK_NEXT }}Next/a/span
spana href{{ LINK_PREVIOUS }}Previous/a/span
/div
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Inconsistent 404

2009-08-21 Thread vp

Although i doubt following is going to work, but give it a try
- url: /ill/request/new/(.*)

Either way, do you have a handler for each:
agRyY2xzcgwLEgZQYXRyb24YNAw  and agRyY2xzcgwLEgZQYXRyb24YNgw

If not, i dont think you can treat the appengine way to handling urls
similar to the pretty urls you can get in Zend Framework on RoR. What
i would do is below:

http://localhost:8080/ill/request/new?key=agRyY2xzcgwLEgZQYXRyb24YNAw



--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Random HTTP 500 errors

2009-08-20 Thread vp

Nick, i sent you an email(your first_name.last_n...@google.com) with
some code. Let me know if you got it.


Thanks
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Cron job fails without giving additional information

2009-08-19 Thread vp

You need to look at the logs. Try looking at the request logs to see
if the request really went through. In case you are processing too
much data, that request log might have got purged by now.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Random HTTP 500 errors

2009-08-19 Thread vp

Since i am not able to find any real issues with my code, i want to
check with all appengine developers if their apps also throw up random
HTTP 500 - Internal Server Error. In my case this is happening mostly
where front-end template related code is involved.

To reiterate the issue, quite a few times, when a user accesses the
site via browser(FF, IE, Chrome, Safari) the page fails to load.
However if user refreshes, the same page loads just fine. If i look at
the logs, there are no mentions in the Error log. In the Request log,
only thing found is information about the request, but no errors.
Also, for almost all these pages, they serve content from memcache,
which means datastore calls are kept to minimum.

If anyone else has seen these kind of errors, please let me know if
you found a workaround.


Thanks
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Random HTTP 500 errors

2009-08-19 Thread vp

Joshua,

Thanks for your response. I see issues even when GAE is not reporting
an outage. In one instance, all i have setup is a redirect from one
page to another another. And quite a few times that redirect just
fails.

-V
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Cron job fails without giving additional information

2009-08-19 Thread vp

Maybe it is a deadline exceeded error. Did you set your app to catch
that error?
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: __key__ problem.

2009-08-19 Thread vp

Maybe you need to use a key method - 
http://code.google.com/appengine/docs/python/datastore/keyclass.html
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Datastore writes are temporarily unavailable

2009-08-18 Thread vp

Can we get an update on this please?
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Random HTTP 500 errors

2009-08-14 Thread vp

It's been quite a few days but 500 errors still keep showing up. To
track down those errors, i have set debugging at each and every point
of my code, but none of the debug points are hit. Instead i think the
request is getting lost at the very start itself. Below is my setup


imports 

class ClassNameTmp(webapp.RequestHandler):
def get(self):
logging.info(self.__class__.__name__+'. Page load point 1')
try:
logging.info(self.__class__.__name__+'. Page load point
2')

except DeadlineExceededError:
logging.critical(self.__class__.__name__+'. Script
DeadlineExceededError Error')
self.redirect(/error)
return

def main():
application = webapp.WSGIApplication([('/classnametmp',
ClassNameTmp)],
 debug=True)
run_wsgi_app(application)

if __name__ == __main__:
  main()


When the app hits the 500 error, i don't even see the message from
logging.info(self.__class__.__name__+'. Page load point 1') in the
logs.

Anyone, any idea as to what might be going on here?

Thanks
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Random HTTP 500 errors

2009-08-14 Thread vp

For a moment i thought this might be a DNS issue since i am on custom
domain. But since the logs show a HTTP 500, it clearly shows AppEngine
did see the request. It's just that the request gets lost from that
point on. Right now, almost 10-20 percent of all requests are ending
with HTTP 500. That is way beyond my comfort limit.

And this issue is happening even on pages that are mostly memcached.
Which means almost no datastore calls.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Random HTTP 500 errors

2009-08-14 Thread vp

Jeff,

Thanks for your reply. That was a good catch. I have now added the
following:

except Exception, e:
logging.critical(self.__class__.__name__+'. Error: '+str
(e))
self.redirect(/error)
return

Let's see if that catches the error

I will email you the app id

Thanks
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---