Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable the automatic checking for updates when Google App Engine Launcher is started?

I've been tinkering with the GAE and I enjoy the ease of use of the GAE Launcher that is available with the Windows SDK.

My problem is that when I start the application, it takes it a long time for it to become responsive. This is because the program first checks for updates before starting the app. This causes it to hang, while it's waiting for a response. My problem is that my primary dev machine is behind a proxy server, and the GAE Launcher is being blocked by the proxy.

Is there a way that I can disable the check for updates to the GAE when I start the launcher? Maybe a command that I can pass to the underlying executable through my shortcut?

like image 748
RLH Avatar asked Jun 24 '11 13:06

RLH


People also ask

What is the purpose of Google App Engine?

App Engine is a fully managed, serverless platform for developing and hosting web applications at scale. You can choose from several popular languages, libraries, and frameworks to develop your apps, and then let App Engine take care of provisioning servers and scaling your app instances based on demand.

Which of the following command helps to create an App Engine app within the current Google Cloud project?

The current Google Cloud project does not contain an App Engine application. Use `gcloud beta app create` to initialize an App Engine application within the project.


3 Answers

Google App Engine (GAE) use the python urllib2 library to check for updates. This library gets the proxy settings from *_proxy environment variables, instead of the windows registry.

By default, ProxyHandler uses the environment variables named <scheme>_proxy, where <scheme> is the URL scheme involved. For example, the http_proxy environment variable is read to obtain the HTTP proxy’s URL.

If you need to use a proxy and don't have this variable properly defined, your GAE Launcher will lock until a connection timeout, delaying the start of the program.

If you create a new environment variable called http_proxy with host_or_ip:port, GAE Launcher will start in a blink of an eye.

To define an environment variable, go to: Control Panel -> System and Security -> System -> Advanced system settings -> Advanced Tab -> Environment Variables...

like image 185
KurzedMetal Avatar answered Nov 15 '22 15:11

KurzedMetal


Make sure all your GAE-java/python processes are shutted down before you fork new ones. It's very often that they stuck and consume processor time and memory after you hit CTRL+C.


[EDIT]

To disable updates run the server with

--disable_update_check

option.

Usage: <dev-appserver> [options] <war directory>


[EDIT]

Open dev_appserver.cmd script from GAE SDK with your favorite text processor and manually add --disable_update_check option right after DevAppServerMain definition.

java -cp "%~dp0\..\lib\appengine-tools-api.jar" ^
com.google.appengine.tools.KickStart ^
   com.google.appengine.tools.development.DevAppServerMain --disable_update_check %*

Next time you'll run an application from the GAE Launcher, it will start with "--disable_update_check" option automatically.


[EDIT]

For Python:

open python source code at

[GAE_SDK_PY]/google/appengine/tools/dev_appserver_main.py

with your favorite text processor, find a 227-th line, it looks like

ARG_SKIP_SDK_UPDATE_CHECK: False,

and overwrite it with following:

  ARG_SKIP_SDK_UPDATE_CHECK: True, 

Hope this helps.

like image 20
surlac Avatar answered Nov 15 '22 17:11

surlac


As an update, the currently working option with Google App Engine 1.9.19 is to edit the file ~/.appcfg_nag to make the following change.

- opt_in: true
+ opt_in: false
  timestamp: 0.0

I found about this by consulting the google_appengine/README:line 120

--skip_sdk_update_check    Skip checking for SDK updates. If false, fall back                                                                                     
                           to opt_in setting specified in .appcfg_nag          
                           (Default false) 
like image 28
venky Avatar answered Nov 15 '22 15:11

venky