Google App Engine 开发服务器在 Windows 中速度较慢,但​​在 Ubuntu Linux 中则不然

发布于 2024-11-19 08:50:01 字数 1043 浏览 1 评论 0原文

在 Ubuntu 中,我运行命令 ./dev_appserver.py 来启动开发服务器。 Linux 下一切都运行得很快。

我还在同一台机器上安装了 Windows 7。在 Windows 中,我从 Google App Engine Launcher(版本 1.5.1)启动开发服务器。服务器似乎启动正常,但一旦运行,页面可能需要几分钟才能开始加载(如果有的话)。该页面往往要么完全加载,要么根本不加载。如果页面确实开始加载,通常速度相当快。并不是图像和脚本的加载速度慢,而是请求本身在某处挂起或丢失。

最常超时的页面是假装的“使用 Google 登录”页面。另外,在挂断期间,偶尔我会收到以下日志消息(但我不确定它是否相关)。大多数时候,我根本不会收到任何消息。

INFO     2011-07-10 22:36:58,631 dev_appserver_index.py:254] Updating C:\Users\Eric\Documents\NetBeansProjects\linkpad\index.yaml

在等待挂起请求时,Windows 任务管理器将显示 GoogleAppEngineLauncher.exe 使用 00 CPU。

关于如何解决这个问题有什么建议吗?

注意:我在某种程度上依赖 Windows 进行测试 - 你猜对了 - IE

编辑: 我一直无法解决这个问题,所以我决定在 Ubuntu 中解决方法:

  1. 安装 VitualBox OSE
  2. 获取 2 个 XP 副本和 1 个 Win7 副本
    • 如果您的学校有 MSDNAA 计划,这些可以免费。尝试用谷歌搜索“yourschool msndaa”。
  3. 在VirtualBox中创建虚拟机如下:
    • XP1 - 安装 IE 7
    • XP2 - 安装 IE 8
    • Win7 - 安装 IE 9

在进行虚拟化路线之前,请确保您有 30GB 的可用空间和至少 2GB 的内存。

In Ubuntu, I run the command ./dev_appserver.py to start the development server. Everything runs snappy under Linux.

I also have Windows 7 installed on the same machine. In Windows, I start the development server from the Google App Engine Launcher (version 1.5.1). The server appears to start up OK, but once it is running, pages may take minutes before they begin to load, if at all. The page tends either to load completely or not at all. If the page does start loading, it's usually fairly quick. It's not the loading of images and scripts that is slow, but it seems like the request itself is getting hung up or lost somewhere.

The page that seems to time out most often is the pretend "Login with Google" page. Also, during hang ups, occasionally I will get the following log message (but I'm not sure that its related). Most times, I won't get any message at all.

INFO     2011-07-10 22:36:58,631 dev_appserver_index.py:254] Updating C:\Users\Eric\Documents\NetBeansProjects\linkpad\index.yaml

While waiting for a hung request, the Windows Task Manager will show GoogleAppEngineLauncher.exe as using 00 CPU.

Any suggestions on how to fix this?

Note: I am somewhat dependent on Windows for testing in--you guessed it--IE

EDIT:
I have not been able to solve this problem, so I have decided to workaround in Ubuntu:

  1. Install VitualBox OSE
  2. Get 2 copies of XP and 1 of Win7
    • These can be free if your school has an MSDNAA program. Try googling "yourschool msndaa."
  3. Create virtual machines in VirtualBox as follows:
    • XP1 - install IE 7
    • XP2 - install IE 8
    • Win7 - install IE 9

Make sure you have 30GB of free space and at least 2GB ram before going the virtualization route.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

日裸衫吸 2024-11-26 08:50:01

您在 Windows 上使用 Chrome 浏览网站吗?如果是这样,您可能需要使用 --disable-preconnect 标志启动 chrome。

dev_appserver.py 的单线程特性与 Chrome 的一些巧妙的连接/请求获取不太相配。

此处此处,如果它影响到您,请加注星标

Are you viewing you site with Chrome when on windows? If so you may want to start chrome with the --disable-preconnect flag.

The single-threaded nature of dev_appserver.py doesn't sit well with some of Chrome's clever connection/request fetching.

There are issues about it here and here, please star if it affects you

爱已欠费 2024-11-26 08:50:01

升级你的CPU,增加你的内存,清理你的窗户。 Windows比Linux使用更多的资源。

尤其是所有这些后台任务、服务和预加载的应用程序都在 Windows 下积极争夺资源。让我们看看,您可能拥有这些服务、任务或预加载:

Oracle 的非商业用途开发数据库服务器、持续活动的恶意文件、软件、cookie 检测器、
Flash、OpenOffice、Java 热点/更新、5 美元/月传真、pdf 打印机、Picassa、msn/aol、find-a- Russian-bride-notification (jest Kiddin)...等。

每次执行新的 Java 更新时, sun/oracle 坚持确保此后预加载其 java 更新通知。有一个都市传说,说某位(美国)共和党参议员曾经说过:“这里有十亿,那里有十亿,很快你就在谈论真钱了”。因此,无论预加载软件的发布者声称他们使用的资源有多么少,它们都会加起来。禁用 MSN、Flash、Open Office 等。我相信您比我更了解这些 Windows 令人毛骨悚然的烦恼。

当我从双核升级到四核,从2GB升级到6GB时,Windows和Ubuntu之间的eclipse性能差异缩小到无法察觉的差异。 Windows 上的 eclipse 有时仍然会死机。我认为在 Windows 上运行 Eclipse 的最佳设置是 6 个 CPU 12 GB RAM - 因为我通常运行两个实例,有时甚至运行三个 Eclipse 实例。偶尔也会使用 netbean。

我还将 jvm 最大堆大小增加到 1024 MB,尽管 eclipse 似乎从未触及这个数量的 VM。

Upgrade your cpu and increase your RAM and clean up your windows. Windows uses more resources than linux.

Especially with all those background tasks, services and preloaded apps actively competing for resources under Windows. Let's see, you probably have these services, tasks or preloadeds:

Oracle's not-for-commercial-use development db server, persistently active malicious file, s/w, cookie detector,
Flash, OpenOffice, Java Hotspot/update, $5/month Fax, pdf printer, Picassa, msn/aol, find-a-russian-bride-notification (jest kiddin) ... etc.

Every time a new Java update is performed, sun/oracle insist on ensuring their java update notification is preloaded thereafter. There's an urban legend that says that a certain (US) Republican senator once said, “A billion here, a billion there, and pretty soon you’re talking real money”. Therefore, no matter how little resources publishers of preloaded s/w say they use, they all add up. Disable MSN, Flash, Open Office, etc. I'm sure you are more savvy than I am in these windows creepy annoyances.

When I upgraded from dual core to quad core and from 2GB to 6 GB, the difference in performance of eclipse between Windows and Ubuntu narrowed to an undetectable difference. Every now and then eclipse on Windows still freezes up. I think the optimal set-up to run eclipse on windows is 6 CPUs 12 GB RAM - because I normally run two instances and sometimes even three instances of eclipse. And then occasionally netbeans as well.

I also increased jvm max heap size to 1024 MB, though eclipse never seems to touch that amount of VM.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文