I'm experiencing the following exception:
in `query': Lost connection to MySQL server during query (Mysql2::Error)
It's very difficult to replicate. When I execute the same MySQL Command manually it might work without any problem.
I have narrowed it down as follows:
1.) I might get this exception when I select a lot of records from a big table. e.g. I have a database with 10million records (and ~50 columns) and I'm getting this error when I select 100k records in one query.
2.) When I do 1.) repeatedly for e.g. 10 times it seems to be more likely that I will get this exception, even when I use new MySQL connections with each query.
I have pasted my MySQL Variables here: http://pastebin.com/D5tfF8Tf
EDIT: I noticed that MySQL is constantly running at ~40% CPU Usage
mysql 22811 40.9 0.3 4281712 244212 ? Ssl Oct31 2909:26 /usr/sbin/mysqld