[google-appengine] Re: Error running Launcher Hello World app Python 2.7 Mac: Invalid argument

2012-11-14 Thread Anand Mistry
Looks like you're missing a '/' at the beginning of the python directory 
you set in the launcher. If you're using OSX 10.8, you don't need to the 
python directory since OSX defaults to using Python 2.7.

On Wednesday, 14 November 2012 12:52:12 UTC+11, Irv Kalb wrote:

 I am attempting to run Google App Engine with Python 2.7, just the basic 
 Hello World application that is built for me using the Google App Engine 
 Launcher.  I have installed Python 2.7 and the latest version of Google App 
 Engine.  I am also using the GAE Launcher.  I create my first application 
 using the Launcher, which creates a folder, and puts in the appropriate 
 files (all matching the documentation).  I have my preferences in GAE set 
 to point to my python 2.7 director.  When I attempt to run from the 
 Launcher, I get the following error in the LOG Console:

 *** Running dev_appserver with the following flags:

 --admin_console_server= --port=8080

 Python command: usr/local/bin/python2.7

 2012-11-13 16:58:14.699 GoogleAppEngineLauncher[1312:203] *** NSTask: Task 
 create for path 'usr/local/bin/python2.7' failed: 22, Invalid argument.  
 Terminating temporary process.


 According tot he documentation, this should not produce any errors, and I 
 should be able to bring up a browser, enter localhost:8080 and get my 
 Hello world output.  But when I do, I get this instead:


 HTTP ERROR: 404

 Problem accessing /. Reason:

 Not Found

 --
 *Powered by Jetty://*

 *
 *

 I don't know what to do to resolve this.Any help would be greatly 
 appreciated.*
 *


 Irv


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/H9KzLZy19c0J.
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: Question on how to modularize handlers

2012-11-10 Thread Anand Mistry
Two things:
1. You need an __init__.py file in the handlers directory
2. Your script line should read 'handlers.test.application'

On Saturday, 10 November 2012 10:52:35 UTC+11, Kyle Finley wrote:

 Shan, if you are using the python27 runtime it should be:

 # app.yaml

 runtime: python27

 - url: /test
   script: handlers/test.application


 https://developers.google.com/appengine/docs/python/config/appconfig#Script_Handlers

 -- Kyle

 On Friday, November 9, 2012 9:18:35 AM UTC-6, Shan Sikdar wrote:

 Hi basic question,

 Basically I'm having trouble modularizing handlers in GAE.

 Specifically in my application I have a download button that calls a Test 
 handler so far I have:
  script 
  $('#download').button().click(function(){
 $('iframe id=dlBox name=dlBox hieght=0px width=0px 
 src=/test').appendTo('body');
  
 });
 /script

 And then at the bottom of the code I have :

 class Test(webapp2.RequestHandler):
 def get(self):
 logging.info(Entered Handler)
 self.response.headers['Content-Type'] = 'text/csv'
 self.response.headers['Content-Disposition'] = attachment; 
 filename=fname.csv
 self.response.out.write(','.join(['a', 'cool', 'test'])) 

 application = webapp2.WSGIApplication([('/', MainHandler),
 ('/query', QueryHandler),
   ('/test', Test) ],
 debug=True)   
 And this works but I want to be able to make the Test class into its own 
 .py file. 

 So I made a folder called handlers saved the class as test.py and then 
 changed my app.yaml to include:
 - url: /test
   script: handlers/test.py

 However when I try clicking the download button it gives the error : 
 ImportError('Could not find module %s' % fullname)
 ImportError: Could not find module handlers.test

 I have also tried changing the app.yaml to:
 - url: /handlers
   static_dir: handlers

 and changing the source in the javascript code to src=/handlers/test.py 
 but in this case there's no error but also it doesn't enter the handler at 
 all it simply just says GET /handlers/test.py HTTP/1.1 200 -

 What am I missing?

 Thanks!

 



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/istXVwDc0kYJ.
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: Seeing 500 response, and error 204 in the logs.

2012-10-29 Thread Anand Mistry
Hi,

This does appear to be an issue with the runtime. We are aware of it and 
are looking to push out a fix in the near future.

Can you email me privately the app id? Thanks.

On Monday, 29 October 2012 10:40:19 UTC+11, timh wrote:


1. 
   1. 
   
   Hi
   
   Every so often I see the following in my logs.  A response code of 
   500, a warning to the effect the instance has crashed, and an error 204 
 in 
   the log.
   I am running Python 2.7 with threading on.  So it seems 
   occasionally the same instance is handling multiple requests when the 
 error 
   occurrs
   affecting multiple requests,  I also get this type of error on 
   warmup requests. These requests fail in a short period, so no timeout's 
   DEE's etc appear
   to be involved.
   
   Unfortunately the complete lack of information from the log does 
   not allow any form of diagnosis.  My assumption is it's a runtime 
 failure 
   of python etc,,
   Anyone got any ideas?
   
   2012-10-29 05:02:57.984 
   /online_store/fish_care/+img/fish_care.jpg?size=thumbnail500 3885ms 
   0kb Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.4 (KHTML, like 
   Gecko) Chrome/22.0.1229.94 Safari/537.4
   
   x.x.x.x - - [28/Oct/2012:14:02:57 -0700] GET 
 /online_store/fish_care/+img/fish_care.jpg?size=thumbnail HTTP/1.1 500 0 
 http://www.fishandlily.com.au/online_store; Mozilla/5.0 (Windows NT 6.0) 
 AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4 
 www.fishandlily.com.au ms=3886 cpu_ms=1342 loading_request=1 exit_code=204 
 instance=00c61b117c46a4eda0a59580bdb26d05cc9a088b 
 https://appengine.google.com/instances?app_id=s~fish-and-lilyversion_id=1-8-8-threadsafe.362388295290349076key=00c61b117c46a4eda0a59580bdb26d05cc9a088b#00c61b117c46a4eda0a59580bdb26d05cc9a088b
   
   2. I2012-10-29 05:02:57.983
   
   This request caused a new process to be started for your application, 
 and thus caused your application code to be loaded for the first time. This 
 request may thus take longer and use more CPU than a typical request for your 
 application.
   
   3. W2012-10-29 05:02:57.983
   
   A problem was encountered with the process that handled this request, 
 causing it to exit. This is likely to cause a new process to be used for the 
 next request to your application. (Error code 204)
   
   2. 
   1. 2012-10-29 05:02:57.983 
   
 /online_store/accessories_and_spares/+img/accessories_and_spares.jpg?size=thumbnail
   500 3754ms 0kb Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.4 
   (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
   
   x.x.x.x - - [28/Oct/2012:14:02:57 -0700] GET 
 /online_store/accessories_and_spares/+img/accessories_and_spares.jpg?size=thumbnail
  HTTP/1.1 500 0 http://www.fishandlily.com.au/online_store; Mozilla/5.0 
 (Windows NT 6.0) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 
 Safari/537.4 www.fishandlily.com.au ms=3754 cpu_ms=0 pending_ms=3754 
 exit_code=204 instance=00c61b117c46a4eda0a59580bdb26d05cc9a088b 
 https://appengine.google.com/instances?app_id=s~fish-and-lilyversion_id=1-8-8-threadsafe.362388295290349076key=00c61b117c46a4eda0a59580bdb26d05cc9a088b#00c61b117c46a4eda0a59580bdb26d05cc9a088b
   
   2. W2012-10-29 05:02:57.983
   
   A problem was encountered with the process that handled this request, 
 causing it to exit. This is likely to cause a new process to be used for the 
 next request to your application. (Error code 204)
   
   


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/iUMkoqI0km8J.
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: Deadline Exceeded Exception on loading requests leaves bad instance running

2012-10-03 Thread Anand Mistry
Hi Jason,

The engineering team is aware of this issue of instances being in a wacky 
state, however, I can't give you any more information.

On Thursday, 4 October 2012 06:06:45 UTC+10, Jason Collins wrote:

 We've seen some Deadline Exceeded Exceptions cropping up on loading 
 requests again. This used to be commonplace (a couple of years ago), but I 
 haven't seen it for a long time... until recently.

 Has anyone else seen this lately? We're seeing it on Py2.7. Normally, 
 these apps warmup in a couple of seconds, so 60-70s startup times are 
 completely abnormal.

 Worse, when this occurs during a loading request, the instance is left in 
 a partially inflated state - in our case, basically all subsequent 
 requests fail with import/pythonpath issues. Our recourse, once we discover 
 this is happening, is to manually kill the instance. This really, really 
 sucks.

 Can anyone make an argument why you would *want* to keep an instance that 
 Deadline Exceeded Exceptions on a loading request? I can't. I think an 
 instance that hits a Deadline Exceeded Exception during a loading request 
 should be thrown away as suspect.

 j


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/qi0vpUoJ2usJ.
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: Crypto with App Engine SDK 1.7.2

2012-10-02 Thread Anand Mistry
You need to install PyCrypto yourself. Grab the tarball 
from https://www.dlitz.net/software/pycrypto/ and run setup.py. 
Unfortunately, installing PyCrypto using easy_install won't work with the 
dev_appserver on OSX.

On Tuesday, 2 October 2012 20:30:46 UTC+10, coto wrote:

 What's the best way on getting pycrypto to work for dev with GAE?

 We are using Crypto in this open source project 
 https://github.com/coto/gae-boilerplate/blob/master/boilerplate/lib/utils.py#L11

 But this is what happen when you run locallly:

 /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python 
 /usr/local/google_appengine/dev_appserver.py .
 WARNING  2012-10-02 10:07:30,936 rdbms_mysqldb.py:74] The rdbms API is not 
 available because the MySQLdb library could not be loaded.
 WARNING  2012-10-02 10:07:31,431 datastore_file_stub.py:518] Could not 
 read datastore data from 
 /var/folders/zr/tclqpy5j6fx797t1fqf2j_d0gn/T/dev_appserver.datastore
 WARNING  2012-10-02 10:07:31,469 dev_appserver.py:3621] Could not 
 initialize images API; you are likely missing the Python PIL module. 
 ImportError: No module named _imaging
 INFO 2012-10-02 10:07:31,568 dev_appserver_multiprocess.py:655] 
 Running application dev~sandengine on port 8080: http://localhost:8080
 INFO 2012-10-02 10:07:31,568 dev_appserver_multiprocess.py:657] Admin 
 console is available at: http://localhost:8080/_ah/admin
 INFO 2012-10-02 10:07:37,680 recording.py:673] Saved; key: 
 __appstats__:057600, part: 27 bytes, full: 1643 bytes, overhead: 0.000 + 
 0.001; link: http://localhost:8080/_ah/stats/details?time=1349172457674
 INFO 2012-10-02 10:07:37,696 dev_appserver.py:3056] GET /_ah/admin 
 HTTP/1.1 302 -
 INFO 2012-10-02 10:07:37,868 recording.py:673] Saved; key: 
 __appstats__:057700, part: 112 bytes, full: 14075 bytes, overhead: 0.001 + 
 0.007; link: http://localhost:8080/_ah/stats/details?time=1349172457722
 INFO 2012-10-02 10:07:37,902 dev_appserver.py:3056] GET 
 /_ah/admin/datastore HTTP/1.1 200 -
 INFO 2012-10-02 10:07:38,325 recording.py:673] Saved; key: 
 __appstats__:058200, part: 42 bytes, full: 1694 bytes, overhead: 0.000 + 
 0.001; link: http://localhost:8080/_ah/stats/details?time=1349172458266
 INFO 2012-10-02 10:07:38,350 dev_appserver.py:3056] GET 
 /_ah/admin/images/google.gif HTTP/1.1 200 -
 ERROR2012-10-02 10:07:42,392 wsgi.py:203] 
 Traceback (most recent call last):
   File 
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py,
  
 line 195, in Handle
 handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
   File 
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py,
  
 line 239, in _LoadHandler
 handler = __import__(path[0])
   File 
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py,
  
 line 719, in Decorate
 return func(self, *args, **kwargs)
   File 
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py,
  
 line 1923, in load_module
 return self.FindAndLoadModule(submodule, fullname, search_path)
   File 
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py,
  
 line 719, in Decorate
 return func(self, *args, **kwargs)
   File 
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py,
  
 line 1787, in FindAndLoadModule
 description)
   File 
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py,
  
 line 719, in Decorate
 return func(self, *args, **kwargs)
   File 
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py,
  
 line 1730, in LoadModuleRestricted
 description)
   File /Users/coto/gae-boilerplate/main.py, line 25, in module
 import routes
   File 
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py,
  
 line 719, in Decorate
 return func(self, *args, **kwargs)
   File 
 

Re: [google-appengine] Re: Crypto with App Engine SDK 1.7.2

2012-10-02 Thread Anand Mistry
Yes. Last I checked, easy_install created a zip file when you install 
PyCrypto, which isn't compatible with our import hook.

On Tuesday, 2 October 2012 21:01:45 UTC+10, Helge Tesdal wrote:

 On Tue, Oct 2, 2012 at 12:39 PM, Anand Mistry 
 ami...@google.comjavascript: 
 wrote: 
  You need to install PyCrypto yourself. Grab the tarball from 
  https://www.dlitz.net/software/pycrypto/ and run setup.py. 
 Unfortunately, 
  installing PyCrypto using easy_install won't work with the dev_appserver 
 on 
  OSX. 

 Not even with 1.7.2? 

 -- 
 Helge Tesdal 
 CTO - mCASH Norge AS 
 +47 815 10 150 
 http://mCA.SH 


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/bUuDFsjpPuYJ.
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: NDB ImportError!

2012-09-24 Thread Anand Mistry
Is a DeadlineExceededError exception raised on the first request to the 
instance?

On Tuesday, 25 September 2012 13:00:00 UTC+10, Waleed wrote:

 Hi all,
 I'm getting random import errors from time to time. They start on one 
 of the instances, and then that instance keeps generating those errors 
 until I shut it down. 

 I tried putting a _ah/warmup request, and in that request I do the 
 import:

 * from google.appengine.ext import ndb*

But that doesn't seem to solve the problem. What am I missing? I'm 
 including the stack trace below.

 Thanks
 Waleed


 

 2012-09-24 13:28:32.968 
 /panorama/blogger?stream_suffix=__bloggerlast_visit_date=1348495705view=manageoffset=0limit=5parent_page_name=panorama
  
 500 291ms 0kb Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 
 Firefox/15.0.1 AlexaToolbar/alxf-2.15
 80.87.92.2 - - [24/Sep/2012:13:28:32 -0700] GET 
 /panorama/blogger?stream_suffix=__bloggerlast_visit_date=1348495705view=manageoffset=0limit=5parent_page_name=panorama
  
 HTTP/1.1 500 0 http://www.networkedblogs.com/panorama; Mozilla/5.0 
 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1 
 AlexaToolbar/alxf-2.15 www.networkedblogs.com ms=291 cpu_ms=238 
 instance=00c61b117c7c127a4e5e1415265fc670470c
 E 2012-09-24 13:28:32.788
 Traceback (most recent call last):
   File 
 /base/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py,
  
 line 195, in Handle
 handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
   File 
 /base/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py,
  
 line 250, in _LoadHandler
 __import__(cumulative_path)
   File 
 /base/data/home/apps/s~networkedblogshr/live.361951794551741701/website/panorama_page.py,
  
 line 9, in module
 from google.appengine.ext import ndb
   File 
 /base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/__init__.py,
  
 line 7, in module
 from tasklets import *
   File 
 /base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py,
  
 line 68, in module
 from .google_imports import apiproxy_stub_map
   File 
 /base/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/google_imports.py,
  
 line 23, in module
 from google.appengine.api import prospective_search
   File 
 /base/python27_runtime/python27_lib/versions/1/google/appengine/api/prospective_search/__init__.py,
  
 line 24, in module
 from prospective_search import *
   File 
 /base/python27_runtime/python27_lib/versions/1/google/appengine/api/prospective_search/prospective_search.py,
  
 line 75, in module
 from google.appengine.api.prospective_search import error_pb
 ImportError: cannot import name error_pb



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/0rcUU4U_gOIJ.
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: os.environ and threadsafe: true

2012-08-28 Thread Anand Mistry
In the python27 runtime, os.environ is thread safe since it is implemented 
as request/thread-local. However, this means that changes in one request 
will not be visible by other requests. Also, since os.environ is 
conceptually a global dictionary, I would recommend against writing to it 
whenever possible. If you need to access request data, you should be 
reading from the first positional parameter passed to the WSGI application 
when it is invoked.

Regarding the relationship between the WSGI environ and os.environ, there 
is no direct relationship specified in PEP333. What PEP333 says is:
The environ parameter is a dictionary object, containing CGI-style 
environment variables

In addition to the CGI-defined variables, the environ dictionary *may* also 
contain arbitrary operating-system environment variables...

Finally, some applications, frameworks, and middleware may wish to use the 
environ dictionary to receive simple string configuration options. Servers 
and gateways *should* support this by allowing an application's deployer to 
specify name-value pairs to be placed in environ. In the simplest case, 
this support can consist merely of copying all operating system-supplied 
environment variables from os.environ into the environ dictionary, since 
the deployer in principle can configure these externally to the server, or 
in the CGI case they may be able to be set via the server's configuration 
files.

This last case we handle by supporting specifying environment variables in 
app.yaml.

On Wednesday, 29 August 2012 07:30:16 UTC+10, Jason Collins wrote:

 The top answer in this SO thread suggests that os.environ should be 
 generally avoided because it's not threadsafe in the threadsafe: truePython 
 2.7 environment.

   
 http://stackoverflow.com/questions/5901653/name-of-current-app-in-google-app-engine-python
   

 I'm dubious because the WSGI spec explicitly uses os.environ to construct 
 its request objects, etc.

 Can anyone confirm/deny the safety of using os.environ in a threadsafe: 
 true deployment?

 Thanks,
 j


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/MLNFNxrQxzMJ.
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: Possible error in the documentation?

2012-08-26 Thread Anand Mistry
Yes. Please file a bug.

On Monday, 27 August 2012 04:05:52 UTC+10, Attila-Mihaly Balazs wrote:

 I believe that the following example is incorrect in the documentation [1]:

 app = ndb.toplevel(webapp.WSGIApplication)([('/', MainPage)])

 It sees to me that the correct way to write this would be:

 app = ndb.toplevel(webapp.WSGIApplication([('/', MainPage)]))

 Otherwise it just wraps the class, not the actual instance of it and while 
 it seems to work, it can lead to silent corruptions (dropping of async 
 tasks).

 Am I correct in this assumption? Should I file a bug for this?

 Thanks,
 Attila

 [1] https://developers.google.com/appengine/docs/python/ndb/async



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/0XwFYJnIhWAJ.
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.



Re: [google-appengine] App Engine Development on a Budget (With a $35 Raspberry Pi computer)

2012-08-26 Thread Anand Mistry
Running the dev_appserver on a Raspberry Pi is an interesting idea. 
However, I think the performance is going to be lacking. Yes, it's 700MHz, 
but you're dealing with an ARM11 as opposed to a a modern x86 chip. Also, I 
suspect the disk IO performance to be pretty bad. I don't have a Pi, but 
I do have a Pandaboard and the SD card performance leaves a lot to be 
desired. Here's a short note from Google's SVP of infrastructure with his 
opinion on processor cores (
http://static.googleusercontent.com/external_content/untrusted_dlcp/research.google.com/fr//pubs/archive/36448.pdf
).

On Sunday, 26 August 2012 16:17:23 UTC+10, Bryce Cutt wrote:

 To be honest I had not yet thought about it much beyond having the initial 
 idea.

 Due to the fact that the dev server is simulating all the GAE services 
 (datastore, urlfetch, memcache, images, etc.) I doubt there is anything 
 useful to learn from how they perform on the dev server that can be applied 
 to the production server. Anything that requires an RPC is going to run far 
 too differently on the dev server. I think all we could really compare is 
 how pure Python code runs.

 Your index example is very likely due to the fact that the simulated 
 datastore does not have the same performance characteristics as the 
 production datastore. The underlying storage system is completely 
 different. If you are not currently using the SQLite backend on the dev 
 server give that a try. In my experience it performs much better than the 
 default one.

 For my tests I was just going to run some processing and memory IO 
 intensive operations and see how they compare. Will this give me any 
 insight into how to better optimize for the production server? Probably 
 not. But, as with getting GAE running on the Pi in the first place, I don't 
 really have any lofty goals with this and I am just curious.

 - Bryce


 On Saturday, August 25, 2012 10:41:04 PM UTC-7, Robert Fischer wrote:

 I love my Raspberry Pi and think this is a neat idea!

 While an interesting project to benchmark the dev_appserver vs an F1 
 instance I'm not sure how to accurately measure performance. What tests do 
 you have in mind?

 The reason I ask is that I have a **very** index happy application and 
 running request on my dev_appserver server (to save hundreds of entities 
 each creating 20+ indexes) it basically locks up the dev_appserver on my 
 quad core desktop and takes over 100 times longer to finish the DB 
 operations than an F1 instance takes.

 Similarly, another intense thing I do to my app is to spawn a LOT of 
 tasks at my backend which spend most of their time waiting on urlfetch 
 responses before doing something trivial. On the dev_appserver these 
 requests seem to be blocking and processed serially but in production they 
 are processed simultaneously.

 I'm curious how you plan to benchmark the raspberry pi dev_appserver vs 
 the production stack.

 -Robert Fischer
 www.DealScorcher.com



 On Sat, Aug 25, 2012 at 10:05 PM, Bryce Cutt pand...@gmail.com wrote:

 Some of you are probably aware of the Raspberry Pi single board 
 computerhttp://www.raspberrypi.org/faqs that 
 runs Linux and Python quite well. When I first heard of it I had lots of 
 ideas of what to use it for and one of those was to run App Engine on it. 
 Why? Because I can. :)

 My Raspberry Pi arrived in the mail yesterday and today I got the Python 
 App Engine SDK running on it. The Pi has a 700Mhz ARM processor and 256MB 
 of RAM and my small Debian (Raspbian) install has about 190MBs of RAM free 
 once it is up and running. I am not running a desktop environment, just 
 bash.

 My initial tests have worked out pretty well with simple apps and as 
 time allows I am going to try building a larger app and deploying to the 
 production servers directly from the Pi. I am curious how the performance 
 compares to a standard F1 App Engine production instance. I may run some 
 tests to see.

 The Raspberry Pi was developed as an inexpensive device to help teach 
 kids how to program. App Engine is a great platform for developing web 
 applications. I think it is a good match at an incredibly low price.
  
 -- 
 You received this message because you are subscribed to the Google 
 Groups Google App Engine group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/google-appengine/-/14lnjwk1RQEJ.
 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.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/CNXZBshxccAJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 

[google-appengine] Re: libgmp bug?

2012-08-23 Thread Anand Mistry
Hi,

Yes, this was caused by the 1.7.1 roll out. What's happening is that you're 
specifying the pycrypto version in your app.yaml as 'latest' instead of a 
specific version. In 1.7.1, we added pycrypto 2.6 to the python27 runtime 
and which is what all applications that specify 'latest' are now using. The 
error message is a bit misleading. Your code will continue to work as-is, 
so there is nothing you have to change. Also, you should only see this 
message on the first request to an instance.

We will look into fixing this issue.

On Thursday, 23 August 2012 08:30:48 UTC+10, Richie Foreman wrote:

 +1 I am also seeing this in my environment as well. 



 On Tuesday, 21 August 2012 10:05:54 UTC-7, c h  wrote: 
  using python27 this started showing in my error logs today: 
  
  
  2012-08-21 
 08:22:06.683/base/python27_runtime/python27_lib/versions/third_party/pycrypto-2.6/Crypto/Util/number.py:57:
  
 PowmInsecureWarning: Not using mpz_powm_sec.  You should rebuild using 
 libgmp = 5 to avoid timing attack vulnerability.E2012-08-21 08:22:06.683 
  _warn(Not using mpz_powm_sec.  You should rebuild using libgmp = 5 to 
 avoid timing attack vulnerability., PowmInsecureWarning) 
  
  
  i have not changed app versions in about a week.  was this caused by a 
 system upgrade?  the error message makes me think it's something that 
 should be fixed? 
  
  
  thanks, 
  
  
  christian 


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/xUQkkrOVwJMJ.
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: is antlr3 library available in python27 ?

2012-07-29 Thread Anand Mistry
It is a small, pure-python library, so it is unlikely we will add it to the 
production runtime.

On Sunday, 29 July 2012 20:31:11 UTC+10, gops wrote:




 antlr3 is available in sdk but not in production.

 is there any possiblity of including it in production ?



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/QlLlp8b6uaoJ.
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.



Re: [google-appengine] Re: numpy and scipy question

2012-07-23 Thread Anand Mistry
If the processing is considered offline and not latency sensitive, then 
you can put that work onto a task queue and take up to 10 minutes. No need 
for a backend.

As for SciPy, Brandon is exactly right. SciPy is written entirely in 
Fortran whereas the other third-party libraries we have (NumPy, PIL, lxml) 
are written in C. For NLTK, do you really need SciPy? According to 
nltk.org, only NumPy is a dependency (optional).

On Monday, 23 July 2012 09:33:35 UTC+10, Hans Then wrote:

 Ah. That is very good news. We have no real timing requirements. I think 
 we will setup a backend instance for long running requests, to get around 
 the 60s limit.

 On Mon, Jul 23, 2012 at 1:24 AM, Drake drak...@digerat.com wrote:

 I think we have everything you need.  We are working on some speed 
 improvements because unfortunately the 60s limit doesn’t let you work with 
 very big documents.

 Do you know how many words at a time you need to put through?

 ** **

 ** **

 *From:* google-appengine@googlegroups.com [mailto:
 google-appengine@googlegroups.com] *On Behalf Of *Hans Then
 *Sent:* Sunday, July 22, 2012 3:51 PM

 *To:* google-appengine@googlegroups.com
 *Subject:* Re: [google-appengine] Re: numpy and scipy question

 ** **

 I am mainly using the classify and the cluster packages.

 ** **

 Thanks for considering this to be included.

 ** **

 Hans 

 Op zondag 22 juli 2012 19:18:25 UTC+2 schreef Brandon Wirtz het volgende:
 

 I am building an API that does much of what NLTK does.  Which parts are 
 you looking to use? Likely making API calls to my optimized version would 
 cost less than actually running the full version, (which includes a lot of 
 things that won’t work on GAE  (like the cool drawing of the sentence 
 diagram)

 If the parts you need don’t take too much effort to add, I’ll put them on 
 my teams task list for the API release in 2 weeks.

  

 -Brandon

  

 *From:* google-appengine@googlegroups.com [mailto:
 google-appengine@googlegroups.com] *On Behalf Of *Hans Then
 *Sent:* Sunday, July 22, 2012 7:04 AM
 *To:* google-appengine@googlegroups.com
 *Subject:* Re: [google-appengine] Re: numpy and scipy question

  

 The application I develop uses libraries such as gensim and NLTK, which 
 depend on SciPy. Currently my plan is to run it on Heroku, but I would much 
 prefer to use appengine.

  

 Hans

 On Sun, Jul 22, 2012 at 11:24 AM, Drake drak...@digerat.com wrote:

 I don’t know then. I thought NumPy was all C… 

 Any how I use Numpy but not SciPy. Apparently Google caters to my every 
 whim and so they gave me what I needed.  J

 Depending what you need Matrix.py, and Euclid.py get you many of the most 
 common things you would use Numpy and Scipy for.

  

  

 *From:* google-appengine@googlegroups.com [mailto:
 google-appengine@googlegroups.com] *On Behalf Of *Hans Then
 *Sent:* Sunday, July 22, 2012 1:34 AM
 *To:* google-appengine@googlegroups.com
 *Subject:* Re: [google-appengine] Re: numpy and scipy question

  

 NumPy is also Fortran. 

  

 But my confusion is that if SciPy will not be supported, then why support 
 NumPy? NumPy and SciPy are hardly ever used separately.

  

 Hans

 Op zondag 22 juli 2012 09:11:00 UTC+2 schreef Brandon Wirtz het volgende:
 

 SciPy is mostly in Fortran. So I don’t give you good odds.

  

 *From:* google-appengine@googlegroups.com [mailto:
 google-appengine@googlegroups.com] *On Behalf Of *Hans Then
 *Sent:* Sunday, July 22, 2012 12:05 AM
 *To:* google-appengine@googlegroups.com
 *Subject:* [google-appengine] Re: numpy and scipy question

  

 Hi Anand,

  

 Are there plans to also support SciPy in the future?

  

 Hans Then

 Op woensdag 25 januari 2012 00:34:53 UTC+1 schreef Anand Mistry het 
 volgende:

 NumPy is available on the Python 2.7 runtime, but SciPy is not.

 -- 
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/google-appengine/-/-WRRRE6BhD8J.
 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.

 -- 
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/google-appengine/-/iM54xnkAilIJ.
 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.

 -- 
 You received this message because you are subscribed to the Google Groups

[google-appengine] Re: How will GAE handle the leap second at 23:59:60 on 6/30/2012?

2012-06-29 Thread Anand Mistry
In general, Google handles leap seconds by smearing that second over the 
course of some time window. You can read about it on the official Google 
blog 
at 
http://googleblog.blogspot.com.au/2011/09/time-technology-and-leaping-seconds.html

On Friday, 29 June 2012 22:21:19 UTC+10, Cesium wrote:

 Here's a summary of the problem:
 The UNIX leap second 
 mess.http://www.madore.org/~david/computers/unix-leap-seconds.html

 How will App Engine's servers handle the leap second?

 David



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/fnvlIMq2kp0J.
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: Maximum time a single task can run for (Python)

2012-05-09 Thread Anand Mistry
On a frontend, 10 minutes. On a backend, 24 hours.

On Wednesday, 9 May 2012 21:57:13 UTC+10, Ian Gillett wrote:

 A quick question - for how long can a Python task run for?
 Thanks,
 Ian.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/F28ybiqNPz4J.
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.



Re: [google-appengine] SMALLEST and FASTEST Template Engine on Python

2012-04-29 Thread Anand Mistry
Also, jinja2 has C-accelerated escaping (via markupsafe) in python27, which 
should add to the speed.

On Wednesday, 25 April 2012 20:09:07 UTC+10, Takashi Matsuo (Google) wrote:

 Hi Ayan,

 I have not tried it myself yet, but how about tenjin?
 http://www.kuwata-lab.com/tenjin/

 Besides that, if you can use python2.7 runtime, jinja2 is now bundled
 in the SDK, and should be fast thanks to its bytecode cache, which is
 only available with python2.7 runtime.

 However, in most cases, the difference here might be negligible
 compared to the cost of various RPCs.

 -- Takashi

 On Wed, Apr 25, 2012 at 6:36 PM, Ayan Debnath ios...@gmail.com wrote:
  Dear Friends,
 
 
  Can you please suggest me which one is the SMALLEST and FASTEST template
  engine for Google App Engine on Python2.5 and Python2.6 ?
 
  I am looking for the SMALLEST and FASTEST.
 
  Thank you
  Ayan Debnath
 
  --
  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.

 -- 
 Takashi Matsuo | Developer Advocate | tmat...@google.com | 03-6384-9224



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/TyRsx4_k01QJ.
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: Miss in the documentation.

2012-04-16 Thread Anand Mistry


On Sunday, 15 April 2012 10:06:26 UTC-7, Magnus wrote:

 On this site: 
 https://developers.google.com/appengine/docs/python/tools/libraries27?hl=sv 

 You show an example: 
 libraries: 
 - name: Django 
   version: 1.2 
 - name: jinja2 
   version: 2.6 
 - name: lxml 
   version: 2.3 
 - name: MarkupSafe 
   version: 0.15 
 - name: NumPy 
   version: 1.6.1 
   ... 

 But when I used the code from that example to import NumPy in 
 development server threw an error. It turns out I should use numpy 
 rather then NumPy. Which I got from this site: 

 https://developers.google.com/appengine/docs/python/python27/using27?hl=sv#Configuring_Libraries
  

 I'm guessing MarkupSafe should really be markupsafe etc. to. And 
 you should probably fix that example so that other guys don't have to 
 scratch their head. :-) 

 By the way, is there any official way to report bugs in the 
 documentation and is more thorough documentation for python 2.7 (or 
 books on the subject) coming?


This is http://code.google.com/p/googleappengine/issues/detail?id=7258. Doc 
bugs should be posted to our issue tracker. As for this particular issue, 
it's fixed internally and will go live in the next release.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/3MUqIbpY-P0J.
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: Import .pyd file in google app engine?

2012-03-27 Thread Anand Mistry
App Engine does not support any native-code Python modules, including those 
written in Fortran. App Engine only supports pure Python code.

On Saturday, 24 March 2012 04:00:31 UTC+11, tao hong wrote:

 Hello,

 I have some old fortran77 codes, and I convert them into .pyd files using 
 f2py. However, I could import these .pyd files in app engine... So does 
 that mean GAE does not support .pyd file? If so, is there any way to call 
 those fortran77 code when my website is hosted by GAE?How about compiling 
 the fortran 77 code on a Linux machine?

 Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/PEpylyuxA2gJ.
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: 503 error while compiling my python application during deployment

2012-03-15 Thread Anand Mistry
Thanks. I'm following up.

On Friday, 16 March 2012 11:51:56 UTC+11, PK wrote:

 We filed issue 7155 two hours ago could somebody follow up?

 Error 503: --- begin server output ---

 Try Again (503)
 An unexpected failure has occurred. Please try again.
 --- end server output ---

 Thanks,
 PK


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/rD6D_G0YTWQJ.
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: Error code 203

2012-03-08 Thread Anand Mistry
For some reason, your request is exceeding the request deadline. Note how 
ms=100065  60 seconds.

On Thursday, 8 March 2012 21:53:00 UTC+11, Bart Thate wrote:


1. 
Hi GAE crew !
1. 
   2. 012-03-08 11:43:35.845 /dispatch 500 100064ms 0kb Mozilla/5.0 
   (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/12.04 
   Chromium/17.0.963.66 Chrome/17.0.963.66 Safari/535.11
   
   snip - - [08/Mar/2012:02:43:35 -0800] POST /dispatch HTTP/1.1 500 
 108 - Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) 
 Ubuntu/12.04 Chromium/17.0.963.66 Chrome/17.0.963.66 Safari/535.11 
 jsonbot-dev.appspot.com ms=100065 cpu_ms=3800 api_cpu_ms=300 
 cpm_usd=0.105758 exit_code=203 
 instance=00c61b117cbd9e17c4e23db6450f4ab1d63a40 
 https://appengine.google.com/instances?app_id=s~jsonbot-devversion_id=2.357035453348805392key=00c61b117cbd9e17c4e23db6450f4ab1d63a40#00c61b117cbd9e17c4e23db6450f4ab1d63a40
   
   3. I2012-03-08 11:43:35.836
   
   The process handling this request unexpectedly died. This is likely to 
 cause a new process to be used for the next request to your application. 
 (Error code 203)
   
   
   

I get this error when trying to create a channel on my bot. Appid is 
jsonbot-dev, python2.7, threadsafe is true, rebooting the instance makes 
 no 
difference.
App is not dead, i handles cron calls properly, even booting the bot 
works ok.
Just when i try to open the frontpage, that does a XHR to create a 
channel token this is what i get.

No logs no nothing .. can't diagnose any other way then black box 
guessing what is going on ;[
Without threadsafe enabled the thing just works, see 
https://jsonbot-hr.appspot.com

Any one can diagnose this ?

Thnx,

Bart
*
*



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/Tro_9l2chs0J.
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: NLTK or Equivalent

2012-03-05 Thread Anand Mistry
Have you looked at using the 'real' NLTK on Python 2.7? As far as I can 
tell, the only hard dependency is NumPy, which we have.

On Tuesday, 6 March 2012 04:21:32 UTC+11, Brandon Wirtz wrote:

 I was looking to do some things using NLTK and found code.google.com/p/*
 nltk*-gae/ which looks promising, but the code on the site has quite a 
 few errors (most of which I worked through) but has a LOT to be implemented 
 (and relies on MemCache never being flushed to work)

 Does anyone know of a better NLTK for GAE implementation? Or do we have an 
 ETA on NLTK being supported on GAE?

  

 -Brandon


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/tcV9fGEo9W4J.
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: setuptools added as third party library

2012-02-29 Thread Anand Mistry
It was added to support PackageLoader template loading in Jinja2. Other 
than that, it's not very useful.

On Thursday, 1 March 2012 03:53:29 UTC+11, gops wrote:

 in recent change, setuptools added as third party library to google app 
 engine.

 I am wondering, what is the use case for it in google app engine ?


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/0t5pVW3RoRIJ.
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.



Re: [google-appengine] Py2.7

2012-02-27 Thread Anand Mistry
We're starting to put more love into the dev_appserver, eventually fixing 
some of these issues. Also, we've had a self-imposed freeze on third-party 
library versions for the past couple of months. Now that we're GA, we can 
lift that freeze and start adding newer library versions. We're already 
adding webapp 2.5.1 and django 1.3 in 1.6.3.

On Tuesday, 28 February 2012 12:08:25 UTC+11, Tom Willis wrote:

 A recent version of webob in the sdk would be nice. :)

 http://code.google.com/p/googleappengine/issues/detail?id=6507

 On Monday, February 27, 2012 6:05:40 PM UTC-5, Cayden Meyer wrote:

 The App Engine team have made many recent changes which have fixed bugs 
 and improved performance. We will continue to make improvements and add new 
 libraries as time goes on. 

 We have seen many applications which have seen significant reductions in 
 the number of instances when using concurrent requests, however concurrent 
 requests will offer the greatest reduction in instance usage when 
 applications are not CPU bound. 

 I encourage you to try Python 2.7 with your own applications and look 
 forward to hearing your questions, comments and suggestions for new 
 libraries http://code.google.com/p/googleappengine/issues/list. 

 Cayden Meyer
 Product Manager, Google App Engine



 On 28 February 2012 06:20, Brandon Wirtz drak...@digerat.com wrote:

 I’m on 2.7 it made a huge difference. Likely if your app is Data Store 
 Heavy you will see Massive improvements. If you are computation heavy you 
 will not.

 Look at your dashboard the CPU Seconds Use/Second will tell you the 
 ratio of Instance CPU Cycles to API CPU cycles. On 2.5  I ran at 1/10 the 
 CPU as the API. On 2.7 I’m at closer to 1/3   

 That didn’t equate to 1/3 fewer instances but it did equate to half as 
 many.

 

 2.7 seems to be hit harder by the random “everything is taking 3 times 
 as long” bug.  And 2.7 instance spin up seems to be a bit slower than 2.5 
 instances.
 Also because you can have more than one request per instance you have to 
 be more aware of your memory usage because if you have an app that uses 50 
 megs of memory and it is serving 3 requests, you will see your instance 
 killed more often for hitting the soft memory limit.

 ** **



 

 *From:* google-appengine@googlegroups.com [mailto:
 google-appengine@googlegroups.com] *On Behalf Of *Joshua Smith
 *Sent:* Monday, February 27, 2012 11:57 AM
 *To:* google-appengine@googlegroups.com
 *Subject:* [google-appengine] Py2.7

 ** **

 In today's blog:

 * *

 *We think the Python 2.7 runtime for App Engine is a great step forward 
 for our developers.  First, it allows applications to take advantage of 
 **concurrent 
 requests*http://code.google.com/appengine/docs/python/python27/newin27.html#Concurrent_Requests
 *, allowing you to build more performant and efficient applications. If 
 your application wasn't fully utilizing the CPU, chances are that you'll be 
 able to use concurrent requests to reduce the total number of instances and 
 serve more with less.*



 

 That doesn't at all gibe with the stats people have been posting.

 ** **

 From what I've read on these lists, 2.7 is slow at RPCs. But RPCs are 
 the main way to not fully utilize the CPU. So for most apps, what you gain 
 in concurrency, you lose in performance per thread.

 ** **

 Is google announcing some performance breakthrough, or is this just 
 reality-distortion-field stuff?

 ** **

 -Joshua

 ** **

 -- 
 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.
  
 -- 
 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.


  
 On Monday, February 27, 2012 6:05:40 PM UTC-5, Cayden Meyer wrote:

 The App Engine team have made many recent changes which have fixed bugs 
 and improved performance. We will continue to make improvements and add new 
 libraries as time goes on. 

 We have seen many applications which have seen significant reductions in 
 the number of instances when using concurrent requests, however concurrent 
 requests will offer the greatest reduction in instance usage when 
 applications are not CPU bound. 

 I encourage you to try Python 2.7 with your own applications and look 
 forward to hearing your questions, comments and suggestions for new 
 libraries http://code.google.com/p/googleappengine/issues/list. 

 Cayden 

Re: [google-appengine] Re: Py2.7

2012-02-27 Thread Anand Mistry


 Now I'm going to reactivate my reality-distortion-field and eat some
 more cake :-)

And here is said cake:
https://plus.sandbox.google.com/u/1/114844683991917629614/posts

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/eKVYrESE16MJ.
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: PIL error - 'type 'ImagingCore' has type type 'ImagingCore', but expected one of: str, unicode,)'

2012-02-11 Thread Anand Mistry
Can you post a short reproducer? The exception itself doesn't appear very 
useful.

On Sunday, 12 February 2012 01:51:15 UTC+11, googlefox wrote:

 I am using PIL with GAE to do some image conversions. My app ran fine 
 in dev_appserver, but I am getting errors when I upload and run it in 
 GAE. 

 2012-02-10 13:18:11.907 type 'exceptions.TypeError' 
 E 2012-02-10 13:18:11.907 (type 'ImagingCore' has type type 
 'ImagingCore', but expected one of: str, unicode,) 
 E 2012-02-10 13:18:11.907 type 'ImagingCore' has type type 
 'ImagingCore', but expected one of: str, unicode 

 -- 

 My WSGI handler already has 'debug=true'. I dont know why it is not 
 showing a full stacktrace. 


This is an issue with webapp2 which has been fixed upstream 
(http://code.google.com/p/webapp-improved/issues/detail?id=34). Until we 
bundle an updated webapp2 version, you can always include the webapp2 
source with your application.
 


 Any idea why this call would fail? 

 feroze.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/aIaRRN3915kJ.
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.



Re: [google-appengine] *.proto API files?

2012-02-08 Thread Anand Mistry
Are you looking for the .proto definition files used to generate the Python 
code? As far as I know, we haven't open sourced those files. I think that 
up till now, it hasn't been necessary, and no-one (that I can tell) has 
requested them for a few years.

Is there a particular reason why you'd like to see these, or is it out of 
curiosity?

  As I recall, the App Engine implementation differs from the open

 source implementation.  I'm not sure of the specifics of that and have
 never personally verified that -- its just something I recall from
 some threads long ago.
 http://code.google.com/apis/protocolbuffers/

It's an implementation detail, but yeah, the Python 2.5 runtime uses the 
old proto1, whereas Python 2.7 uses proto2.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/hjZ2CTqf9JUJ.
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: numpy and scipy question

2012-01-24 Thread Anand Mistry
NumPy is available on the Python 2.7 runtime, but SciPy is not.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/Qv-KNHFgQBQJ.
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.



Re: [google-appengine] Re: Put_Async Use It

2012-01-23 Thread Anand Mistry
Hm. This sounds a little counter intuitive. If you have threadsafe enabled, 
the instance is able to process another request while a synchronous 
datastore operation is in effect. The async ops should be most helpful when 
you have threadsafe disabled. It sounds like there might be something else 
going on. Maybe you're gaining by avoiding some badness with the GIL, or 
maybe you're taking advantage of temporal locality with respect to L1/L2 
caches, although I doubt the effect would be that big. Or maybe I'm 
completely missing something.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/Yt9oGLwjr7MJ.
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.



Re: [google-appengine] 'Flush' Like I'm tapping out but keep working in Python?

2012-01-23 Thread Anand Mistry
Yes. All elements of an app, including multiple app versions and task 
queues, share a memcache.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/TE7no_HRfY8J.
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: Google Bot Is Still the enemy...

2012-01-09 Thread Anand Mistry
Have you looked into using Sitemaps 
(http://www.sitemaps.org/protocol.html#changefreqdef) to hint at how often 
to crawl your site? Google, Bing, and Yahoo all recognise the sitemaps 
protocol, even though they may act on it differently.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/Kg4DY93V0C8J.
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 Admin broken on python27

2011-12-27 Thread Anand Mistry
Looks like you're trying to use a feature of the datastore admin that uses 
map reduce. This is not well tested with Python 2.7 and may not work. This 
is one of the reasons why we're removing datastore admin and map reduce 
from python 2.7 in 1.6.2 (map reduce will be back). 

The recommended way to use datastore admin with Python 2.7 is by enabling 
it through the administration console 
(http://code.google.com/appengine/docs/adminconsole/datastoreadmin.html).

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/y_ZkAucnx2YJ.
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: 1.6.1 Pre-release SDKs are live

2011-12-05 Thread Anand Mistry
Yes.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/2uaWVCEetC4J.
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.



Re: [google-appengine] Re: HR down?

2011-11-23 Thread Anand Mistry
What are your apps that are being affected?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/KVcMX9J_94UJ.
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.



Re: [google-appengine] Re: 30 minutes of DeadlineExceededError waiting for datastore, is the appengine status online?

2011-11-23 Thread Anand Mistry
Thanks everyone for the report. We are looking into this.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/wXrR7TpwLQ4J.
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: Multithreading question

2011-11-22 Thread Anand Mistry
In general, I would recommend against creating threads in frontends unless 
your request is long-lived since thread creation is a fairly heavy weight 
operation. get_multi() is probably the best way to get multiple values from 
memcache because it amortises the cost of making the RPC, both in terms of 
CPU and wall time.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/-fZhTRyrr14J.
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: Instances - How do they work?

2011-11-22 Thread Anand Mistry
On Monday, 21 November 2011 10:25:34 UTC-8, WallyDD wrote:

 I am little confused with how these instances work.

 How long does an instance stay alive?
 A site in Python 2.5 (M/S) fires up an instance when it is accessed
 and the instance stays alive for minutes after.
 With Python 2.7(HRD) the instance is killed off after a matter of
 seconds. So I either have to pay and keep the application alive but
 then it gets tricky.
 And to add insult to injury, if I access a python 2.7 application and
 get one page, the instance lasts for a few seconds but I am billed for
 15 minutes. If I am billed for 15 minutes please would it be possible
 for the instance to stay alive for something close to 15 minutes?

For Python 2.7 specifically, we're aware of the short instance life. Please 
be aware that the Python 2.7 runtime is still experimental and so rough 
spots like this can happen.

As for billing, remember, you only get charged the 15 minutes once per 
instance. If that instance goes away and comes back within 15 minutes, you 
don't get charged again.
 

 Now if I enable billing (for the cost of $2.10 a week).
 I can adjust the sliders under application settings, I have two
 settings Idle instances and Pending latency.

 Leaving Idle instances at Automatic results in instances only
 lasting a few seconds. Setting it to 1 results in having a Resident
 instance and this sort of works. I can use the application a little
 but then a second instance fires up and leaves one instance completely
 idle. All I want is one instance running. I put Pending Latency up
 to 500ms to try and stop other instances firing up.

I believe (I'm not an expert here) the purpose of Idle Instances is to 
absorb extra traffic to help your app scale more smoothly. Once you start 
using that instance, it's no longer idle so the system spins up another 
instance.
 

 I use the application and so now I have two instances serving, The
 resident instance is sitting there doing nothing and I am using
 another instance but being billed for both.
 So I go an play with the sliders and set idle instances to automatic
 and it kills one off (the resident one that was doing nothing). But
 then the instances start with their stop start routine and the
 application is very unresponsive.

 Is there a bug with the instancing or is there something that I really
 don't understand here.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/WbFHPU_H-FIJ.
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: Threaded Python AppEngine for Dummies

2011-11-06 Thread Anand Mistry
On Sunday, 6 November 2011 02:01:26 UTC+11, bFlood wrote:

 thanks Anand, good to know you guys are on the case. Brandon's comment 
 gave me hope so I looked into my code a little deeper. Here are a 
 couple of comments (I'm by no means a Python expert so I'm unsure 
 about a GIL details) 

 1) I still see the issue above, random delays between calls under 
 load. For example, a call to memcache takes a few ms on one request 
 but then takes 200-300ms on another. Under no load it always quick


Remember, your instance is limited to 600MHz. Under load, you're probably 
hitting this limit and our limiting mechanism is kicking in. However, 200ms 
seems excessive.
 


 2) access from the native appspot.com domain seems faster then a 
 custom one (I can't remember if this is an issue with the existing 
 runtime too) 


*shurggs* I don't know much about this part of the system.
 


 3) on one of my larger tests involving existing code that was running 
 horribly in the threaded runtime , the main culprit turned out to be 
 the xml minidom. I'm assuming it's not threadsafe so I'll need to move 
 to lxml 


Pure-python xml parsing is probably fairly CPU intensive. Depending on the 
performance difference, lxml may or may not help.
 


 4) I use a lot of static class methods, I'm not sure if the class def 
 is locked by the GIL (I had thought not) 

 Is this threadsafe with the GIL? 
 class Util(): 
 @staticmethod 
 def DoSomething(): 
  pass


I'm not a Python expert, but I think this is OK. Of course, if your static 
method mutates global data, then you need to protect that data with a lock.
 


 5) I'm using webapp2, are there any know issues there? 


Nope, not as far as I know.
 


 6) Are async RPC calls necessary to get the threadsafe benefits (ex 
 async urlfetch)? or can we use the standard sync calls as well? 


Nope, doesn't matter. You can use sync or async, or a combination.
 


 thanks, python27 is going to be great 
 brian 








 On Nov 4, 9:42 pm, Anand Mistry ami...@google.com wrote: 
  Although I can't get into any details, we are aware of these issues in 
 the 
  python27 runtime. Like you noted, the runtime is experimental (hey, 
 we've 
  only been live for one release cycle), and improvements are still 
 coming. 
  
  On a more general note, the python27 runtime is implemented using the 
  CPython interpreter from python.org and hence is open to issues related 
 to 
  the GIL. I suggest readinghttp://
 wiki.python.org/moin/GlobalInterpreterLockto get some background 
  into multi-threading performance issues in Python.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/4AubKIWfTpcJ.
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: Threaded Python AppEngine for Dummies

2011-11-04 Thread Anand Mistry
Although I can't get into any details, we are aware of these issues in the 
python27 runtime. Like you noted, the runtime is experimental (hey, we've 
only been live for one release cycle), and improvements are still coming.

On a more general note, the python27 runtime is implemented using the 
CPython interpreter from python.org and hence is open to issues related to 
the GIL. I suggest reading 
http://wiki.python.org/moin/GlobalInterpreterLock to get some background 
into multi-threading performance issues in Python.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/UGq2YZ9KIroJ.
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.



Re: [google-appengine] Threaded Python AppEngine for Dummies

2011-10-14 Thread Anand Mistry
If you are using instance caching, you can use the runtime API 
(http://code.google.com/appengine/docs/python/backends/runtimeapi.html) to 
look up your instance memory usage in order to control your cache size.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/FBIsJ9U7h7cJ.
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: ereporter error under py27

2011-10-11 Thread Anand Mistry
Try using google.appengine.ext.ereporter.report_generator.application as 
the script handler.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/U2gw0F-jBWUJ.
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: DOS error

2010-04-23 Thread Anand Mistry
Hi,

Can you please provide some details on the error you are seeing, as
well as steps to reproduce. Note that simply deleting the dos.yaml
file will not update or delete the DoS configuration on the server.

Thanks.

On Apr 23, 11:03 am, Jairo Vasquez Moreno jvasq...@mentez.com wrote:
 Hi,

 I deleted my dos.yaml file and I update. Then when I go to blacklists it
 shows GAE error page.

 Also It seems my content is blocked from some parts

 Any idea?

 --
 Jairo Vasquez Moreno
 Mentez Developerwww.mentez.com
 Medellin - Colombia

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

-- 
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-appeng...@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.