I’ve recently been building a new slice and following my own instructions on how to build the FastCGI library. One problem was that pages seemed to load quite slowly, and the delay was in multiples of 30 seconds. After several hours of tracing through the Smalltalk code and watching the OS processes and network connections, it appeared that each TCP/IP connection between FastCGI and Apache was remaining open for 30 seconds. The Smalltalk FastCGI server was closing its connection to FastCGI client, but the FastCGI client was not closing its connection to Apache.

I’ve been unable to find any discussion of this on any forums. I then tried copying the library, /usr/lib/apache2/modules/mod_fastcgi.so from the VMware virtual appliance (available here) to the slice and the problem went away. The mystery is why the library we built on 15 January 2007 behaves differently from the one built three years later.

I’ve tried building an older version (from http://www.fastcgi.com/dist/old/mod_fastcgi-2.4.4.tar.gz) but the result is the same, so it seems to be more than just a change to writing to client (though that seemed suspicious).

In any case, the old library works, so I’ve put a copy of it at ftp.gemstone.com:/pub/GemStone64/mod_fastcgi.so. If anyone has any suggestions, I’d love to hear them. Have you been able to build a FastCGI library and get it to work well with GLASS?

Advertisements