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 8508951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:18:04+00:00 2026-06-11T03:18:04+00:00

My RequestHandler looks like this: class GetChart(webapp2.RequestHandler): def post(self): station_id = cgi.escape(self.request.get(‘id’)) request_time =

  • 0

My RequestHandler looks like this:

class GetChart(webapp2.RequestHandler):
    def post(self):
        station_id = cgi.escape(self.request.get('id'))
        request_time = cgi.escape(self.request.get('time'))
        request_date_string = cgi.escape(self.request.get('date'))
        request_date = datetime.strptime(
            request_date_string, "%m/%d/%Y")
        # Build the URL string. (Details removed.)
        url_string = ****
        logging.info(url_string)
        sock = urllib2.urlopen(url_string)
        data = sock.read()
        sock.close()
        for line in data.split('\n'):
            # If I put 'pass' here instead, there's no delay between
            # the 'Returning' and the response actually being sent.
            logging.info(line)

        result_json = {'status': 'Not implemented'}
        self.response.out.write(json.dumps(result_json))
        logging.info('Returning.')

logging.basicConfig(level=logging.INFO)
app = webapp2.WSGIApplication([('/', MainPage),
                               ('/submit', GetChart)],
                              debug=True)

In my logs, I see this:

INFO     2011-11-26 19:41:44,243 atmosview.py:131] Returning.
INFO     2011-11-26 19:41:51,331 dev_appserver.py:2753] "POST /submit HTTP/1.1" 200 -

That’s a 7 second delay between the ‘Returning’ being logged, and the response actually being sent. Why is this?

I also notice that if I replace the logging.info(line) with pass, the delay is much less: about 0.2 seconds.

Is there something with the logging module that causes the function to not actually return immediately, especially when a lot of calls have been made to logging.info()?

  • 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-11T03:18:05+00:00Added an answer on June 11, 2026 at 3:18 am

    It looks like this may be a bug in the AppEngine 1.6.0 dev_appserver: code.google.com/p/googleappengine/issues/detail?id=6315

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

Sidebar

Related Questions

I have something like this set up: class CategoryPage (webapp.RequestHandler): def get(self): ** DO
take this example from google docs class BrowseHandler(webapp.RequestHandler): > def get(self, category, product_id): >
Given this simple class: class RenderResponseHandler(webapp2.RequestHandler): def __init__(self): self.nombreUsuario = obtenerUsuarioTablaUsuario().nombre if obtenerUsuarioTablaUsuario() else
I am using Tornado and I have the following code: class UserHandler(RequestHandler): def get(self):
class sss(webapp.RequestHandler): def get(self): url = http://www.google.com/ result = urlfetch.fetch(url) if result.status_code == 200:
Handler Implementation class TestHandler(RequestHandler, Jinja2Mixin): def get(self): channel_id = str(random.randint(1, 10000)) + str(datetime.now()) chat_token
I tried the following code and it didn't work: class SourceUpdate(webapp.RequestHandler): def post(self): id
I think I'm using the Users API incorrectly: class BaseHandler(webapp.RequestHandler): user = users.get_current_user() def
i use modified webapp.RequestHandler for handling requests in my app: class MyRequestHandler(webapp.RequestHandler): Request handler
class FirstModel(db.Model): p = db.StringProperty() r=db.ReferenceProperty(SecondModel) class SecondModel(db.Model): r = db.ReferenceProperty(FirstModel) class sss(webapp.RequestHandler): def

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.