HTML Website on Google App Engine

200 views
Skip to first unread message

Apra Barua

unread,
Jun 17, 2012, 12:27:36 PM6/17/12
to google-a...@googlegroups.com
Hi, 

I have a static html website on Google App Engine. The only traffic is myself visiting the website to test. I notice that it consumes Frontend Instance Hours very quickly. Is it possible to make it not create any instance so that frontend instance hours are not consumed? 

Thanks,
Apra B

Alessandro Aglietti

unread,
Jun 18, 2012, 4:06:22 AM6/18/12
to google-a...@googlegroups.com
I think that the solution is setting up Max Idle Instances to 1 in the "Application Settings".

Inline image 1

Regards


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/s-EtXzh6T3cJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.



--
Alessandro Aglietti

webLog - CV - Google+

"Gli'è ora d'illuminassi, tirassi sui i calzoni e levassi"

Screen Shot 2012-06-18 at 10.05.48 AM.png

Apra Barua

unread,
Jun 18, 2012, 5:23:31 AM6/18/12
to google-a...@googlegroups.com
Hi Alessandro, yes I did that but it still fires up instances when someone requests my website.


On Monday, June 18, 2012 1:36:22 PM UTC+5:30, Alessandro Aglietti wrote:
I think that the solution is setting up Max Idle Instances to 1 in the "Application Settings".

Inline image 1

Regards


On Sun, Jun 17, 2012 at 6:27 PM, Apra Barua  wrote:
Hi, 

I have a static html website on Google App Engine. The only traffic is myself visiting the website to test. I notice that it consumes Frontend Instance Hours very quickly. Is it possible to make it not create any instance so that frontend instance hours are not consumed? 

Thanks,
Apra B

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/s-EtXzh6T3cJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Alessandro Aglietti

unread,
Jun 18, 2012, 9:44:52 AM6/18/12
to google-a...@googlegroups.com
Maybe there was a time gap before settings was applied.

I'm waiting for news

Cheers

To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/VGV09Q3ZAW0J.

To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

Kyle Finley

unread,
Jun 18, 2012, 12:38:32 PM6/18/12
to google-a...@googlegroups.com
Have you mapped the root ('/') to a template? If so, App Engine will have to start an instance to handle this request. Also any request that are not specified in the app.yaml file will be sent to the instance causing it to start up. Be sure to account map the favicon.icon for example.

Generally I would not worry about it consuming frontend instance hours unless your site is geting more then 1 or 2 request / sec. App Engine graciously gives you 28hrs / day more then enough to fulfill 1 to 2 request / sec.

If you still have questions post your app.yaml file so we'll have a better idea of your set up.

- Kyle


Apra Barua

unread,
Jun 19, 2012, 5:46:09 AM6/19/12
to google-a...@googlegroups.com
Hey, I got it to work. Thanks...


On Monday, June 18, 2012 7:14:52 PM UTC+5:30, Alessandro Aglietti wrote:
Maybe there was a time gap before settings was applied.

I'm waiting for news

Cheers

Apra Barua

unread,
Jun 19, 2012, 5:48:10 AM6/19/12
to google-a...@googlegroups.com
Hey, I got it to work, it is not creating instance now. Thanks. The following app.yaml file worked.

application: myappname
version: 1
runtime: python
api_version: 1

default_expiration: "12m"

handlers:
- url: /(.*\.(gif|png|jpg|ico|js|css|pdf|html))
  static_files: \1
  upload: (.*\.(gif|png|jpg|ico|js|css|pdf|html))

- url: /
  static_files: index.html
  upload: index.html

Christopher Ramírez

unread,
Jun 19, 2012, 11:45:50 AM6/19/12
to google-a...@googlegroups.com
It's better for you to use python27 since it is multithreaded. That's means an instance can handle more than one request simustaneously. Also increase "default_expiration" when you be ready to deploy to the public your website.  default_expiration: "7d" (7 days) is a good value. 

Andreas

unread,
Jun 19, 2012, 11:50:17 AM6/19/12
to google-a...@googlegroups.com
christofer that does not make sense. he has only static html so static file handlers will do all he needs.
why setting up a handler for this anyway? single or multithreaded... static file handlers are the best choice in this case.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/5sR8SAHUfGoJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.

Nickolas Daskalou

unread,
Jun 19, 2012, 8:30:44 PM6/19/12
to google-a...@googlegroups.com
For HTML files, I would caution against setting such a large default_expiration value (7 days).

Setting it to such a high value means that, worst case, if you decide to change one of your site's pages, end users won't be able to see the change for 7 days (due to caches at both the browser level and Google's edge cache servers).

You can get away with leaving a large default_expiration value for all other static files (eg. CSS, JS, images) and still have new static file uploads appear "instantly" by versioning them (eg. base1.css, base2.css).

Nick
Reply all
Reply to author
Forward
0 new messages