For some reason I missed the rest of this discussion. Just a quick follow up.
+ I upgraded psycopg2 from 2.0.7 (default in Debian 5) to the latest version, 2.4. This manual installation was smoother than I thought. + Result: preliminary stress tests show that the problem *disappeared*. No more WSGI premature script error.