Sporadically getting error Mysql::Error: Lost connection

Do you have the mysql-ruby bindings installed? I don’t know how you installed Rails and / or Ruby on your system. Some distros have this as a package.

You could also install it with gems

sudo gem install mysql

provided that you have everything set up right on your box (paths, compilers, etc),

I don’t know Centos at all, so I won’t be much more help than that. However, I’ve seen that error before whenever I had heavy dtabase access in my Rails apps and they were using the Mysql libraries that comes with Rails rather than the much faster C bindings I talked about here.

Hope that helps you some.

Thanks for the reply

I installed mysql via:

gem install mysql --with-mysql-config=/usr/bin/mysql_config

I figure if there was a problem with this then I would not be able to connect at all, right?

Not necessarily. Rails could still be using the native one.

If you do

gem list mysql

does it show up on the list? If it does then I have no idea what’s wrong. If it doesn’t show up then it didn’t install (that’s happened to me as well)

Here is what I get - seems about right, correct?

gem list mysql

*** LOCAL GEMS ***

mysql (2.7)     MySQL/Ruby provides the same functions for Ruby programs that the     MySQL C API provides for C programs.

I just enabled MySql logging and I see the query (an update query in this case) being executed and the rolled back.

Anyone have opinions on what payment processors are best? I am using Payflow right now wondering if I should change or keep using it. Plan on using ActiveMerchant so want something that it supports.

Any opinions or recommendations out there?