5Answers
  • 4
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Trac with mod_python slow?

I have some Trac installations running on my Ubuntu/Apache web server and I've noticed that when I monitor the CPU usage while accessing Trac pages that it is not uncommon for the CPU to spike up to a 100%. It concerns me that this happens with just one user accessing the system.

Is there a way I can make accessing Trac on my web server less CPU intensive?

For information: There's a discussion about that point at http://trac.edgewall.org/ticket/7490. They are referring to performance issues with KeepAlive in Apache2.x with mod_python.

Quoted from follow up 17: with keepalive on we got constant 80% CPU utilization on our server with keepalive off we got constant 15% CPU utilization on our server CPU load comes from Apache processes

  • 2
Reply Report

There was also a similar question on the Trac ML, probably it help you (in particular the last mail with a possible configuration of Apache): ML Mail (Google Groups) " Trac 0.11 so slow!!!!!"

Edit Probably, but as I didn't have such problems, this could be also from interest for you: performance and garbage collection. However, I don't think this is the case here...

Edit #2 Just remembered that with the next stable release the performance problem will be gone (if it is because of mod_defleat). See also the Dev-ML: Preparing next stable release (first point after the "However...")

  • 1
Reply Report

It also depends on your database. Which database server are you using? Is it on the same host as your Trac server? Are you sure the CPU usage is coming from Apache?

Personally I've found trac runs better on mod_fastcgi, and even better on mod_wsgi. We're using a VM on a modestly spec'd VM host to host our Trac instance and it's in constant use (as in being refreshed every few seconds) by around 20 employees without any problems.

  • 1
Reply Report
    • I'm using the default SQLite set up. I'm using htop to monitor the CPU usage on the server and I can see the Apache thread spike up.

Trending Tags