Hi,
I am currently running an API written in Grape using Puma. However,
occasionally when I query the API I get the following error: "Mysql2::Error:
MySQL server has gone away"
If i refresh the page it works as expected. My database.yml file is:
production: adapter: mysql2 database: test_db host: localhost user: user
password: pass development: adapter: mysql2 database: test_db_dev host:
localhost user: user password: pass
What causes this issue and how can I fix it? I am connecting like so:
config = YAML::load_file("config/database.yml")[ENV['RACK_ENV']]
DB =
Sequel.connect("#{config['adapter']}://#{config['host']}/#{config['database']}",
user: "#{config['user']}", password: "#{config['password']}")
Thanks
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.