I didn't find the origin of my "upstream prematurely closed connection while reading response header from upstream" error, but since I changed spawn-fcgi to php-fpm, there is no more error. So, today, the lesson is "use php-fpm" (http://php-fpm.anight.org/) -- Posted via http://www.ruby-forum.com/.