Hi all,

here is the deal:

my apache server reached the maximum limit for workers several times in
the last week.

every time I had to restart it, and it bought me 10-20 hours, till the
next incident.

I setup mod_status with extended information, and ran a script that
fetched it every minute to see what is the server status before the
problem appears.

my server didn't disappoint and I got the problem 3-4 hours after I
setup this.


it appears that trac is leaking apache workers.

my trac is configured with wsgi, and it looks like when there is a
certain trac error (any trac error?) the request does not terminate
properly.

with wild and stupid bots out there, this is a recipe for a disaster.


attached is the output of the extended log. you can see that 143
requests are being served at once, all from the firestats.cc vhost (let
me assure you that my site is no where near that popular).

 

looking at the trac log, I can see many errors like:


2008-10-02 06:04:38,134 Trac[__init__] ERROR: database is locked
Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py",
line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File
"/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py",
line 222, in dispatch
    req.session.save()
  File
"/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/session.py",
line 97, in save
    (self.sid,))
  File
"/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/util.py",
line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File
"/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/sqlite_backend.py",
line 58, in execute
    args or [])
  File
"/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/db/sqlite_backend.py",
line 50, in _rollback_on_error
    return function(self, *args, **kwargs)
OperationalError: database is locked


just before the shit hits the fan.


before I upgraded trac, I used the RobotsTxtPlugin, but it does not seem
to be available for 0.11.


so, to summarize:

1. Bots can kill my trac site.

2. it appears that trac does not properly terminate resopnses on error.

3. robots.txt would help this situation (but not solve it as some bots
gives a flying fuck), but it's not available for 0.11.


help would be appreciated.


    Omry.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


<<< text/html: Unrecognized >>>

Reply via email to