1

I've been dealing with this for a while now and it's really frustrating me. I've searched before for others who've had this problem, I found a few leads, but none of the solutions worked for me, plus they seemed a bit old so things may have moved on.

I have Google Apps Engine (Python) Installed, and I've got some pages set up that I know work, but when I click refresh, or use it in any way, it takes between 20-40 seconds before I get any response.

It's a very simple site it should be fine and I know that the code should run smoothly. It's the newest version GoogleAppEngine-1.9.11 now although it was the same with the previous two versions, and I'm using python-2.7.8.

I want to be able to develop, but I can't work efficiently like this. On my old laptop that got stolen a while ago (I've finally got round to playing with this again) it worked fine, and it was a much worse laptop, although I was running it on Linux. I've tried to install Linux on this laptop but some UEFI stuff means that's turned out to be incredibly difficult and I don't want to risk my other data.

I've got Zone Alarm firewall installed, and I've turned down the settings on that as far as I can. I've even disconnected from the internet so I could turn it all the way off. I've played with the trusted zones etc. None of it helped.

I have AVG antivirus installed and I've tried to disable that from interfering. Didn't help.

I'm running Windows 8.1 and I don't know what else to try. I don't know what else might be relevant to check or what settings I need to look into. I don't know what more information I should post.

Thanks for your help.

  • Did you have this same issue with a previous version of App Engine or just 1.9.10 and 1.9.11? We are noticing the same thing, and it started happening in version 1.9.10 but it might not be the same issue. – Bardia D. Sep 19 '14 at 15:10
  • Yeah I did have the same issue, I've been dealing with this in my spare time for the past couple of weeks. And version 1.8.6. – Caspar Nonclercq Sep 19 '14 at 15:33
  • Could your pages try to load some external/unreachable JS library? Are you seeing any errors the browser's Dev Tools? Dev tools show which requests take what time, do you see anything there? If you have any static files (i.e. images/css/js/etc) not handled by your framework but by `app.yaml` - do they also take 20 seconds to respond? – Mihail Russu Sep 19 '14 at 16:41
  • Looking at the log console showed that it was complaining about a missing PIL library. There are no images on the site so that shouldn't matter. I've now installed that though (I probably will want it), restarted GAE and no change. The only other interesting thing it says is that it's skipping the SDK update. Although the 'about' thing says it's up to date. – Caspar Nonclercq Sep 19 '14 at 16:53
  • I meant the browser's console log / Dev Tools (I don't think browser would know anything about PIL library). Are there any errors in your browser console log? Do static files also take 20 seconds to respond? – Mihail Russu Sep 19 '14 at 18:11
  • It takes that long with static files as well. I found this via my browser rot13 /unit2 GET 200 OK text/html Other 479 B 312 B 42.50 s 42.49 s jquery.min.map ifalmiidchkjjmkkbkoaibpmoeichmki/bower_components/jquery/dist GET (failed) net::ERR_FILE_NOT_FOUND Other 0 B 0 B 54 ms - That's formatted badly, but it was searching for jquery.min.map for all that time. I don't know what that means. I'll have a go at following [these](http://stackoverflow.com/questions/18487596/error-jquery-2-0-2-min-map-not-found) instructions when I get a chance. – Caspar Nonclercq Sep 19 '14 at 20:41
  • The "ERR_FILE_NOT_FOUND" error is from an unrelated (I assume) "ProxMate" extension for Chrome browser. Although, just in case, you probably already did it but anyway, could you try the same thing in a different browser with no extensions? Also, to avoid bad formatting, you could update your post with screenshots / formatted text. – Mihail Russu Sep 19 '14 at 23:08
  • Consider installing linux on a VM, then developing on that. It should be less painful then what you are describing here. – Paul Collingwood Sep 20 '14 at 13:03

1 Answers1

1

I've come to realize that the following facts and setup degrade the performance on your localhost setup (dev_appserver):

  1. Total datastore entities (models) you have stored in your local datastore
  2. The total number of indexes in your application (as seen in index.yaml)
  3. How many queries you perform, and whether or not you set the require_indexes flag off
  4. If you use task queues, pipelines or any deferred method of execution.
  5. Too many log messages to the console

We have an application with over 75 data models, about 50-60 indexes and we use task queues and pipelines. I found it nearly impossible to get through a typical use case where we fetch data and show it on a web page without these settings on server start:

--log_level=error --require_indexes=yes

--log_level=error just sets the global logger level higher than INFO so it's not that chatty. You may also have to put this in a startup method or the not-so-well documented appengine_config.py (https://developers.google.com/appengine/docs/python/tools/appengineconfig#Python_Module_Configuration):

logging.getLogger().setLevel(logging.ERROR)

--require_indexes=yes will turn auto-generation of indexes off. I noticed a drastic change in performance with this set to yes. See https://developers.google.com/appengine/docs/python/tools/devserver#Python_Command-line_arguments for more details.

Our next goal is to reduce the number of indexes, and increase our usage of memcache-fronted queries to avoid datastore bottlenecks.

Bardia D.
  • 693
  • 3
  • 8
  • `--require_indexes=yes` didn't help in my case, and I don't see how changing the log level can make much of a difference – typeracer Jan 29 '20 at 20:48