Resolving MySQL Lost Connection Errors

In some environments its possible to occasionally experience these types of errors with the Arcadia Visualization Server:

..."Lost connection to MySQL server during query") 
django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')

This may indicate some unexpected latency during communication with the MySQL server if this happening frequently and its important to check the network connectivity and throughput if that’s the case. Otherwise, another option is to increase the net_read_timeout global setting in your MySQL config.

Below is an example of setting net_read_timeout to 60 seconds (default is 30 seconds).

# this is read by the standalone daemon and embedded servers
[server]

# this is only for the mysqld standalone daemon
[mysqld]
datadir=/mnt1/mysql_lib/mysql/
socket=/mnt1/mysql_lib/mysql/mysql.sock
transaction-isolation = READ-COMMITTED
# Disabling symbolic-links is recommended to prevent assorted security risks;

# to do so, uncomment this line:
symbolic-links = 0

key_buffer = 16M
key_buffer_size = 32M
max_allowed_packet = 32M
thread_stack = 256K
thread_cache_size = 64
query_cache_limit = 8M
query_cache_size = 64M
query_cache_type = 1
max_connections = 550

net_read_timeout = 60

For more information on this MySQL issue, please visit this page.