Copia goes down, thanks to logstats plug-in (?)

So this morning I noticed Copia was down. Requests would hang until they timed out. Apache seemed up, and running pyblosxom.cgi directly worked fine. I enabled the CGI debug line:

import cgitb; cgitb.enable()

But this didn't help. It felt like an infinite loop somewhere in the guts of processing. After fitful debugging efforts (got work piling up), I traced the problem to the logstats.py module. My approach in the end was to use py['load_plugins'] in config.py, comment out all plug-ins, and uncomment them until I found the culprit. It was really cool to uncover comments one by one and see different aspects of the site start working step by step. It really reinforces the power of PyBlosxom's "microkernel" approach. My resulting config was:

py['load_plugins'] = [
  "comments",
  "firstdaydiv",
  "keywords",
  "logrequest",
  #"logstats",
  "meta",
  "metatime",
  "pyarchives",
  "pycalendar",
  "pymarkdown",
  "trackback",
  "xmlrpc_blogger",
  "xmlrpc_metaweblog",
  "xmlrpc",
]
#The above list is only for debug purposes.  If *not* debugging,
#Uncomment the following line
#del py['load_plugins']

I'll have to check later into what;s causing logstats.py to kill the server, but other PyBlosxom users might want to take note.

[Uche Ogbuji]

via Copia
1 response
I have two guesses based on the information above.  The first guess is that the locking code isn't working right.  logstats needs to lock the datafile because it reads it in and then writes out a changed datafile.



My second guess is that there's a problem with logstats and the version of PyBlosxom you're using.  It appears that logstats hasn't been touched since I redid the locking code in February of 2004.



Let us know if you can track down the issue further or not on the pyblosxom-users mailing list (you don't have to be a subscriber to send to the list).  Or alternatively, feel free to email me: willg at bluesock dot org .



Good luck!

/will