FreeBSD上のALBで、spawnに関係したエラー

Post date: 2013/04/25 14:44:05

alb -e productionでシミュレーションをバックグランドで実行すると以下のエラーが出る。

spawn> Exception in child[95384] - NameError: uninitialized class variable @@connection_\

handler in ActiveRecord::Base

spawn> child[95384] took 0.001968 sec

Processing TestbenchAssignmentsController#sim_single (for 192.168.200.8 at 2013-04-25 23\

:27:02) [GET]

Parameters: {"id"=>"1933"}

Redirected to http://localhost:3003/instances/324

Completed in 959ms (DB: 725) | 302 Found [http://localhost/testbench_assignments/sim_sin\

gle/1933]

/!\ FAILSAFE /!\ Thu Apr 25 23:27:03 +0900 2013

Status: 500 Internal Server Error

Mysql2::Error: MySQL server has gone away: UPDATE `sessions` SET `data` = 'BAh

結論的には、railsのバージョンが2.3.11になっていたのがまずかったようだ。activeXXも含めて 2.3.5に戻したら解決した。

spawnはずっとpluginにしていたが、今回googleしたところ、上記エラーはspawnが古いのが原因との情報があり、

gem install spawnなどしてみたが何か様子がおかしい。

さらに調べたところ、pluginで使っていたspawnと、gemのspawnは別物だった。https://github.com/tra/spawn#readme

によれば、2013-4-15にspawnは、spwnlingに名前が変わったとのこと。