Python Logging from Multiple Processes

We have a server running a Python application in Apache with mod_wsgi. In httpd.conf we configured 4 processes to run this application, each with multiple threads. This configuration caused us some troubles. We extensively used memory to cache some results from very complicated and time-consuming computation and also some key-value pairs for efficient reading, and […]

Using Facebook (and Other Sites) as User Authentication System

Many sites use Facebook Connect today, hoping to share the popularity of Facebook, pulling Facebook users’ profile/feed, and publishing their own site-generated contents to users’ feed/wall. So most Facebook Graph tutorials, including Facebook’s own documentation, tell us how to add Facebook Connect button to our sites, how to set the redirect URL, how to grab […]

Mac OS X 10.6.5 PHP Problem

Earlier today, I wanted to setup a PHP development environment on my MacBook Pro. It was expected to be very simple. As many tutorials said, I just uncommented the “LoadModule php5_module libexec/apache2/libphp5.so”, enabled web sharing in system preferences, and expected to see PHP working by visiting http://localhost/~myusername/. But no luck. Firefox just can’t connect to […]

Lighttpd fastcgi – How to Restart a Specific Site Without Affecting Others

Having used fastcgi in lighttpd for a while, I wondered if there was a way to restart one fastcgi site/application without affecting other sites. Because I have many fastcgi sites hosted in a single lighttpd instance, and I don’t want them all to be shut down for a little while each time I want to […]