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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:15:19+00:00 2026-05-17T06:15:19+00:00

I have an Apache2 + mod_python setup which has begun responding impossibly slow since

  • 0

I have an Apache2 + mod_python setup which has begun responding impossibly slow since some days – two seconds of processor time for any request of my app.
Some interesting points:

  • Debugbar says it’s ~15ms of query time. DB is not the main suspect
  • Logging with datetime.now() shows 0.1s is spent inside the view, and 40ms more are spent inside a requestcontext
  • I could not find an easy way to time template rendering.

Any idea of where can I look?

  • 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-17T06:15:19+00:00Added an answer on May 17, 2026 at 6:15 am

    Suppose it had an infinite loop. How would you find it?

    I imagine you would just pause it in the debugger and look at the code at the various levels of the stack, because you know the loop is somewhere on the stack. Right?

    Suppose the loop isn’t infinite, merely taking a long time. Is that much different?

    No matter what the problem is, if it is costing you some percent of time, like 90%, or 50%, or 20%, that’s the probability you will catch it in the act when you pause it. So if you pause it several times, you’re going to see it. The worse it is, the fewer times you have to pause it and look. It will be obvious.

    So forget about timing. Just find out what it’s doing.


    In response to question, here is some mod_python doc:

    5.4.1 PythonEnablePdb Syntax:
    PythonEnablePdb {On, Off}
    Default: PythonEnablePdb Off
    Context: server
    config, virtual host, directory,
    htaccess Override: not None Module:
    mod python.c When On, mod python will
    execute the handler functions within
    the Python debugger pdb using the
    pdb.runcall() function. Because pdb is
    an interactive tool, start httpd from
    the command line with the -DONE
    PROCESS option when using this
    directive. As soon as your handler
    code is entered, you will see a Pdb
    prompt allowing you to step through
    the code and examine variables.

    5.4.2 PythonDebug Syntax:
    PythonDebug {On, Off} Default: PythonDebug Off
    Context: server config, virtual host,
    directory, htaccess Override: not None
    Module: mod python.c Normally, the
    traceback output resulting from
    uncaught Python errors is sent to the
    error log. With PythonDebug On
    directive specified, the output will
    be sent to the client (as well as the
    log), except when the error is IOError
    while writing, in which case it will
    go to the error log. This directive is
    very useful during the development
    process. It is recommended that you do
    not use it production environment as
    it may reveal to the client
    unintended, possibly sensitive
    security information.

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

Sidebar

Related Questions

I have setup an Apache2 mod_python environment with stackless Python and it is working.
I seem to have some problems installing mod_python with apache. ./configure --prefix=/usr/local/apache2 make make
I have two django sites that use the same database and share some of
I have a django web application running on our apache2 production server using mod_python
I have an Apache2/mod_perl2 system up and running. I'm using GD to create an
I have deployed a Django 1.3.1 app on apache2 in my machine using mod_wsgi
I have a request handler running in apache/mod_php which occasionally expands beyond the maximum
I am using Tomcat 6 and have some questions about Apache mod_jk as follows.
i have some problems getting trac to be running with apache. have no idea
I have a php add which calls LaTeX then passes the PDF to the

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.