about processes and engines

lost connection

screenshotI had put online a demo version of “densha”. It was quite shaky, very unstable. I had lots of “Mysql::Error: Lost connection to MySQL server during query: …”. I was thinking it was the machine, a rented virtual box.

Processes were breaking… Bad.

Solution :

sudo apt-get install libmysqlclient15-dev
sudo gem install mysql

Back to improving Densha and its documentation.

Thanks to Alain for his help.

Written by John Mettraux

September 6, 2007 at 11:45 am

Posted in openwferu, rails, ruby

2 Responses

Subscribe to comments with RSS.

  1. A long post with a happy end, just for Google actually… ;-)

    For some reason, I suddenly started to get the same errors on my Win32 machine at work. For example, right after launching a process in Densha/ruote-web, shortly after I launched one earlier:

    Mysql::Error: Lost connection to MySQL server during query: SELECT * FROM `workitems` WHERE (wfid LIKE ‘20080507-gayuhayupa%’ AND participant_name = ‘admin’) LIMIT 1

    (this query would in fact yield zero rows; the process fires a concurrence, and first does some “system” tasks for which no workitem store is defined — in other words: launching the process would throw me back at ruote-web’s launch process view)

    I don’t know what changed — I only recall making changes to the process definition. But the same process runs fine on my Mac at home, and on some Ubuntu machine.

    On the Win32 machine I noticed that the Mongrel log showed:

    WARNING: You’re using the Ruby-based MySQL library that ships with Rails. This library is not suited for production. Please install the C-based MySQL library instead (gem install mysql).

    Now, I thought I got rid of that warning by running “gem install mysql” some time ago, but I’m not sure the warning actually disappeared. A “gem list mysql” showed that I had installed the C-based library (well: it showed “mysql (2.7.3)” instead of “mysql (2.7) MySQL/Ruby provides the same functions for Ruby programs that the MySQL C API provides for C programs” which I found on Google). And a “gem uninstall mysql” followed by “gem install mysql” did not change anything either.

    Happy end, after hours I got rid of both the warning and the problem by adding mysql/bin to my Windows PATH (and, in fact, moving cygwin/bin to the end), and restarting RadRails… :-)

    Arjan van Bentem

    May 7, 2008 at 8:31 am

  2. Thanks for the precious info !

    John Mettraux

    May 7, 2008 at 8:33 am

Comments are closed.

%d bloggers like this: