Feature Request P2
Status Update
Comments
sd...@gmail.com <sd...@gmail.com> #2
Here is a log of a case where I had an error in admin_products.py. I edited the file so the variable close WAS defined, and refreshed the page in my browser. As you can see from my logging, the SDK isn't even checking if admin_products.py has changed, despite it finding an error in it! And I've no idea why it is checking admin_settings.py - I haven't browsed to that file since restarting the SDK.
INFO 2012-11-06 05:57:43,855 dev_appserver.py:3099] "POST /admin/products HTTP/1.1" 500 -
INFO 2012-11-06 05:58:21,219 dev_appserver.py:2585] --- File /home/gregf/Servers/google_appengine/carebookings/util.py unchanged (old:1352091886 new:1352091886)
INFO 2012-11-06 05:58:21,220 dev_appserver.py:2585] --- File /home/gregf/Servers/google_appengine/carebookings/main.py unchanged (old:1351752907 new:1351752907)
INFO 2012-11-06 05:58:21,222 dev_appserver.py:2585] --- File /home/gregf/Servers/google_appengine/carebookings/admin_settings.py unchanged (old:1351828350 new:1351828350)
INFO 2012-11-06 05:58:21,223 dev_appserver.py:2585] --- File /home/gregf/Servers/google_appengine/carebookings/models.py unchanged (old:1352178442 new:1352178442)
ERROR 2012-11-06 05:58:21,233 main.py:17] global name 'close' is not defined
Traceback (most recent call last):
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 1530, in __call__
rv = self.router.dispatch(request, response)
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 1102, in __call__
return handler.dispatch()
File "/home/gregf/Servers/google_appengine/carebookings/util.py", line 81, in dispatch
super(BaseHandler, self).dispatch()
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/home/gregf/Servers/google_appengine/carebookings/admin_products.py", line 105, in post
self.org.products[pid]=Product(name, colour, limit, close, desc)
NameError: global name 'close' is not defined
INFO 2012-11-06 05:58:21,239 dev_appserver.py:3099] "POST /admin/products HTTP/1.1" 500 -
INFO 2012-11-06 05:57:43,855 dev_appserver.py:3099] "POST /admin/products HTTP/1.1" 500 -
INFO 2012-11-06 05:58:21,219 dev_appserver.py:2585] --- File /home/gregf/Servers/google_appengine/carebookings/util.py unchanged (old:1352091886 new:1352091886)
INFO 2012-11-06 05:58:21,220 dev_appserver.py:2585] --- File /home/gregf/Servers/google_appengine/carebookings/main.py unchanged (old:1351752907 new:1351752907)
INFO 2012-11-06 05:58:21,222 dev_appserver.py:2585] --- File /home/gregf/Servers/google_appengine/carebookings/admin_settings.py unchanged (old:1351828350 new:1351828350)
INFO 2012-11-06 05:58:21,223 dev_appserver.py:2585] --- File /home/gregf/Servers/google_appengine/carebookings/models.py unchanged (old:1352178442 new:1352178442)
ERROR 2012-11-06 05:58:21,233 main.py:17] global name 'close' is not defined
Traceback (most recent call last):
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 1530, in __call__
rv = self.router.dispatch(request, response)
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 1102, in __call__
return handler.dispatch()
File "/home/gregf/Servers/google_appengine/carebookings/util.py", line 81, in dispatch
super(BaseHandler, self).dispatch()
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/home/gregf/Servers/google_appengine/lib/webapp2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/home/gregf/Servers/google_appengine/carebookings/admin_products.py", line 105, in post
self.org.products[pid]=Product(name, colour, limit, close, desc)
NameError: global name 'close' is not defined
INFO 2012-11-06 05:58:21,239 dev_appserver.py:3099] "POST /admin/products HTTP/1.1" 500 -
f....@gmail.com <f....@gmail.com> #3
[Comment deleted]
sd...@gmail.com <sd...@gmail.com> #4
I reverted to 1.7.1 and then 1.7.2 and changes were detected during a minimal test. I then re-installed 1.7.3 and changes were also detected, so I can't say if the problem is related to a particular version without more extensive testing.
I'll continue to use 1.7.3 until it breaks again, then revert to 1.7.2 and use that till it breaks.
I'll continue to use 1.7.3 until it breaks again, then revert to 1.7.2 and use that till it breaks.
sd...@gmail.com <sd...@gmail.com> #5
Can you try adding the line:
self._dirty = True
as the first line after the docstring in the AreModuleFilesModified() in google/appengine/tools/dev_appserver.py
self._dirty = True
as the first line after the docstring in the AreModuleFilesModified() in google/appengine/tools/dev_appserver.py
sd...@gmail.com <sd...@gmail.com> #6
The Vary bug is still not fixed, so here is a new bug for it:
http://code.google.com/p/googleappengine/issues/detail?id=4277
Hopefully it will get some attention as it is reasonably serious.
Hopefully it will get some attention as it is reasonably serious.
sd...@gmail.com <sd...@gmail.com> #7
- The cache will be flushed when you redeploy
- The cache is available for Google Apps domains, but
Also, it seems to work whether billing is enabled or not.
sa...@gmail.com <sa...@gmail.com> #8
- The cache is available for Google Apps domains, but appspot.com domains
Is this a typo? Did you mean "but *not* forappspot.com domains"?
Is this a typo? Did you mean "but *not* for
sd...@gmail.com <sd...@gmail.com> #9
Woops, yes that's a typo. The appspot.com domain is NOT supported, according to the info at the link provided. Maybe this will change in the future.
gr...@google.com <gr...@google.com>
ja...@gmail.com <ja...@gmail.com> #10
Just created #5576 requesting an option to disable access to an app via its appspot domain if it has a Google Apps domain. Since the edge cache is disabled for the appspot domain, this would reduce vulnerability to DoS attacks.
ja...@gmail.com <ja...@gmail.com> #11
pr...@google.com <pr...@google.com> #12
Will try to reproduce this issue, and followup there.
sd...@gmail.com <sd...@gmail.com> #13
New info, via:
https://groups.google.com/d/topic/google-appengine/6xAV2Q5x8AU/discussion
"If you want edge caching to work you need to make sure you have done the following things:
1. Set Public If you don’t set public it won’t be cached ever.
2. Set a max-age . If you set public but don’t specify max-age it won’t be cached
3. Use a comma. public, max-age=300 works fine. Public; max-age=300 does not.
4. Set an age greater than 60. 61 seems to cache. 60 does not. There is probably some volume to will I cache based on expiration but 61 seconds at the volumes we run seems to cache and 60 doesn’t ever seem to.
5. Set an age less than 366 days. 364 days seems to work 365 works most the time 366 never seems to work. So those “Expire never” kinds of posts people talk about for versioned assets that never expire. Well 10 years is not the right answer.
6. Expires with a date, doesn’t seem to help, and seemingly may prevent caching in some instances. I think this may be clock drift. Or something about how picky the parser is about the format of the date. Things that work in browsers don’t always work correctly in the edgecache… (like the Semi vs the comma)
7. Set both Pragma and Cache-Control If Pragma is not set Public then Cache-Control seems to be ignored.
"If you want edge caching to work you need to make sure you have done the following things:
1. Set Public If you don’t set public it won’t be cached ever.
2. Set a max-age . If you set public but don’t specify max-age it won’t be cached
3. Use a comma. public, max-age=300 works fine. Public; max-age=300 does not.
4. Set an age greater than 60. 61 seems to cache. 60 does not. There is probably some volume to will I cache based on expiration but 61 seconds at the volumes we run seems to cache and 60 doesn’t ever seem to.
5. Set an age less than 366 days. 364 days seems to work 365 works most the time 366 never seems to work. So those “Expire never” kinds of posts people talk about for versioned assets that never expire. Well 10 years is not the right answer.
6. Expires with a date, doesn’t seem to help, and seemingly may prevent caching in some instances. I think this may be clock drift. Or something about how picky the parser is about the format of the date. Things that work in browsers don’t always work correctly in the edgecache… (like the Semi vs the comma)
7. Set both Pragma and Cache-Control If Pragma is not set Public then Cache-Control seems to be ignored.
ja...@gmail.com <ja...@gmail.com> #14
Quoting Comment 6 by sdeasey, Dec 18, 2010:
>https://groups.google.com/d/msg/google-appengine/8QgEUBOiNFw/m4O5quSO8q0J
>
> - The cache will be flushed when you redeploy
Just got the edge cache to work for the first time thanks to Brandon's tips (quoted in previous comment), but in my testing I've caused a response to be cached for a whole year by setting "s-maxage". (Kicking myself for not using a smaller value; was only paying attention to max-age.) I thought the edge cache would be flushed on redeploy thanks to the above, but after redeploying, the edge cache is still serving this stale response, in production, no less, since the edge cache doesn't work on appspot domains.
So is there any way to flush the cache? The edge cache continues to serve stale responses for the cached url even after disabling the app.
>
>
> - The cache will be flushed when you redeploy
Just got the edge cache to work for the first time thanks to Brandon's tips (quoted in previous comment), but in my testing I've caused a response to be cached for a whole year by setting "s-maxage". (Kicking myself for not using a smaller value; was only paying attention to max-age.) I thought the edge cache would be flushed on redeploy thanks to the above, but after redeploying, the edge cache is still serving this stale response, in production, no less, since the edge cache doesn't work on appspot domains.
So is there any way to flush the cache? The edge cache continues to serve stale responses for the cached url even after disabling the app.
ja...@gmail.com <ja...@gmail.com> #15
Between yesterday and today something caused the stale response to be flushed from the cache after all. If it was something I did, it took a while to kick in.
pr...@google.com <pr...@google.com>
fr...@gmail.com <fr...@gmail.com> #18
This issue has been accepted quite some time ago, but nobody has been assigned yet.
ab...@gmail.com <ab...@gmail.com> #19
No word yet? I'd really like to know under what conditions edge caching won't be leveraged as my app isn't serving any cached requests right now. Query cursors?
jp...@pettitt.net <jp...@pettitt.net> #20
Bump. another year and still no doc ...
[Deleted User] <[Deleted User]> #21
I'll bump this as well. It's been far too long. Now that the Cloud CDN has been documented, it seems like the cat is out of the bag. Can someone please document how the Appengine GFEs are different than the Cloud CDN GFEs?
https://cloud.google.com/cdn/docs/caching
[Deleted User] <[Deleted User]> #22
Does this page help resolve this ticket? https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled#response_caching
(That's for Python 3, standard environment; I assume the GFE works the same for other environments but I don't know if the documentation exists for others)
(That's for Python 3, standard environment; I assume the GFE works the same for other environments but I don't know if the documentation exists for others)
he...@gmail.com <he...@gmail.com> #23
^ That page helps! It's too short - ideally the questions in
Description
response, then the App Engine infrastructure should act as if there were a
caching reverse-proxy server in front of my app.
The next request for the same URL should be served directly from the cache
without an instance of my app being started.
The amount of cache space, should be determined by App Engine, as memcache
space is. Responses with cache-control headers could be sampled by App
Engine; those with the most frequent requests would stay in cache longer.
The advantages would be: 1) less cpu/memory usage by my app to serve what
are basically static resources; 2) higher requests per second without
running more instances; 3) cached content served by Google's geographically
dispersed, low-latency edge servers.
This is a model familiar to many web developers and requires no extra APIs,
or even documentation. It is good practice to cache-control headers.