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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:49:51+00:00 2026-05-30T08:49:51+00:00

I am trying to create a simple web app using Python on GAE. The

  • 0

I am trying to create a simple web app using Python on GAE. The app needs to spawn some threads per request received. For this I am using python’s threading library. I spawn all the threads and then wait on them.

t1.start()
t2.start()
t3.start()

t1.join()
t2.join()
t3.join()

The application runs fine except for the fact that the threads are running serially rather than concurrently(confirmed this by printing the timestamps at the beginning/end of each thread’s run() method). I have followed the instructions given in http://code.google.com/appengine/docs/python/python27/using27.html#Multithreading to enable multithreading

My app.yaml looks like:

application: myapp
version: 1
runtime: python27
api_version: 1
threadsafe: true

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

- url: /stylesheet
  static_dir: stylesheet

- url: /javascript
  static_dir: javascript

- url: /pages
  static_dir: pages

- url: .*
  script: main.app

I made sure that my local GoogleAppLauncher uses python 2.7 by setting the path explicitly in the preferences.

My threads have an average run-time of 2-3 seconds in which they make a url open call and do some processing on the result.

Am I doing something wrong, or missing some configuration to enable multithreading?

  • 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-05-30T08:49:53+00:00Added an answer on May 30, 2026 at 8:49 am

    Are you experiencing this in the dev_appserver or after uploading your app to the production service? From your mention of GoogleAppLauncher it sounds like you may be seeing this in the dev_appserver; the dev_appserver does not emulate the threading behavior of the production servers, and you’d be surprised to find that it works just fine after you deploy your app. (If not, add a comment here.)

    Another idea: if you are mostly waiting for the urlfetch, you can run many urlfetch calls in parallel by using the async interface to urlfetch:
    http://code.google.com/appengine/docs/python/urlfetch/asynchronousrequests.html

    This approach does not require threads. (It still doesn’t properly parallelize the requests in the dev_appserver; but it does do things properly on the production servers.)

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

Sidebar

Related Questions

Im trying to create a simple pan and zoom app using silverlight 4, but
I am trying to create a simple dialog in MFC using Visual C++. My
I'm trying to create a simple toggling sidebar using jquery, where it expands and
I am trying to create a simple mouseover effect using a combination of mouseover,
I'm trying to create a simple database table using the PHP MySQL query Create
I am trying to create a simple Python module for MySQL Workbench 5.1.17 SE
i am trying to create and run a simple Spring 3.1 mvc web application
I am trying to setup a simple restful web application, using tomcat 6.0.32, cxf
I am trying to create an android app that will connect to various web
I'm trying run a simple Java/MySQL web app tutorial in NetBeans. I am able

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.