Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7928993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:55:15+00:00 2026-06-03T19:55:15+00:00

I am having a problem with the AppEngine serving me a blank page every

  • 0

I am having a problem with the AppEngine serving me a blank page every time the instance is loaded.
It is similar problem already covered here, however, there was no constructive solution mentioned that would help my case.

As there are no errors in the console, this one seems to be extremely hard to debug and I frankly do not know how to start. I have not solution mentioned in the previous post as I do not want to rename any of my files and I want to keep my code organised as it is now.

Lastly, to ask a broader question – what is the difference the first and subsequent requests are handled for each of the instances? Is there anything a developer should be aware of?

So what exactly happens – if the appengine’s code is loaded for the first time, I get a blank page. Every subsequent request is fine. I think I have all the required parts of the code there, just in case here are the handlers from app.yaml (also, the app is using python27 as a platform):

handlers:
- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico

- url: /fb/.*
  script: fbhandler.py

- url: /xarpc/.*
  script: xmlrpchandler.py

- url: /
  script: main.py

- url: .*
  script: main.py

The handler in question is the fbhandler.py.

def main():
    application = webapp.WSGIApplication([("/fb/", FBHandler)], debug=True)

    util.run_wsgi_app(application)


if __name__ == '__main__':
    main()

If I examine the appengine logs, I see this for the “blank” request:

2012-05-07 10:43:14.822 /fb/?id=341108955956205 200 2998ms 0kb Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
95.23.245.xx - - [07/May/2012:03:43:14 -0700] "POST /fb/?id=xxx HTTP/1.1" 200 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" "xxx.appspot.com" ms=2999 cpu_ms=563 api_cpu_ms=0 cpm_usd=0.015744 loading_request=1 instance=00c61b117cb0ca2fc61adc3939c4bd034dfa416f
I 2012-05-07 10:43:14.822
This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.

Compared to this for any good subsequent request:

2012-05-07 10:44:05.479 /fb/?id=341108955956205 200 832ms 0kb Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
95.23.245.xx - - [07/May/2012:03:44:05 -0700] "POST /fb/?id=xxx HTTP/1.1" 200 483 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" "xxx.appspot.com" ms=832 cpu_ms=1272 api_cpu_ms=1078 cpm_usd=0.035497 instance=00c61b117cb0ca2fc61adc3939c4bd034dfa416f

As you can see, no obvious error messages anywhere.

Update:
Upon advice, I have removed the main() to try to rule out caching, now the handler looks like:

application = webapp.WSGIApplication([("/fb/", FBHandler)], debug=True)
util.run_wsgi_app(application)

Same effect, first load gets blank page and subsequent loads get proper data. What I have noticed that it does not matter if a new code is uploaded or not, if an instance is running and I update the code, it shows properly on the first load. I need to go into instances admin and shut one down to reproduce the error.

Update 2:
I have now tried changing the handlers to the new python27 way:

- url: /fb/.*
  script: fbhandler.app

And also corresponding change to the fbhandler

import webapp2
app = webapp2.WSGIApplication([("/fb/", FBHandler)])

Again, same issue. I have also tried removing the debug parameter with no effect.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:55:19+00:00Added an answer on June 3, 2026 at 7:55 pm

    SOLUTION

    I now seem to have found a solution. When I upgraded all of the application handlers to the webapp2 and used the new way of referencing them, it now seems to work without the first load error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problem with Rails plugin attachment_fu . On every upload, I get validation
I am having a slight problem with the appengine SDK. When I close it,
I am having problem with appending a div with an image to a page
I'm using django with app-engine-patch and I'm having this wierd problem running manage.py dumpdata
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
Im having problem extending the life of my session. I tried //start sessions ini_set('session.gc-maxlifetime',
I'm having problem about web service method with auto increment ID. I have a
We're having problem with a huge number of legacy stored procedures at work. Do
I'm having problem in the following line: rd.PrintOptions.PaperSize = PaperSize.PaperFanfoldStdGerman; it throws an exception
I'm having problem when running my Windows Forms program. In the program, I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.