解决windows 使用google app engine (urlopen error 10060)
来源:互联网 发布:ff14蒂法捏脸数据 编辑:程序博客网 时间:2024/04/29 09:19
Google App Engine Launcher takes forever to start when launched behind a proxy server
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 to become responsive. I assume that 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. This is a problem because my primary dev machine is behind a proxy server.
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?
Thanks in advance.
2 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...
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.
- 解决windows 使用google app engine (urlopen error 10060)
- Google APP Engine 使用
- urlopen error [errno 10060]的解决思路
- urlopen error [errno 10060]的解决思路
- urlopen error [errno 10060]的解决思路
- Google App Engine使用简介
- google app engine 初次使用
- Google App Engine使用随记
- Google App Engine使用简介
- Google App Engine使用简介
- 怎样使用Google App Engine
- Google App Engine: RUN JSP ERROR
- 解决爬虫错误:urllib.error.URLError: <urlopen error [WinError 10060]
- 使用eclipse调试gae(google app engine)
- Google App Engine管理控制台的使用
- Java 开发 2.0: 使用 Google App Engine
- 教你如何使用 Google App Engine
- 使用 Grails 开发 Google App Engine 应用
- zendframework2中变相实现自定义的controller的继承
- 全天候提供引用媒体流直播
- 高并发系统设计
- 对象数组的排序Comparable接口的使用
- Java通用排序工具类
- 解决windows 使用google app engine (urlopen error 10060)
- 文本框onfocus()清空默认显示内容调用函数实现
- Linus:利用二级指针删除单向链表
- 【转】浅析linux内核调度器与时间系统之PID 哈希表
- margin-bottom float IE7/IE6 失效
- Oracle BPM 11g & Case Management
- 数据结构之队列
- PAT (Advanced Level) Practise 1021. Deepest Root (25)
- Android 内存溢出解决方案(OOM) 整理总结