-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
I'm using this gem in production alongside with Sinatra, ActiveRecord and Puma. Puma is running with 2 workers.
My code for database queries is identical to the following snippet:
database_connections = YAML.load_file('./databases_list.yml')
database_connections.each do |connection_info|
connection = ActiveRecord::Base.establish_connection(connection_info)
connection.execute('SELECT * FROM ...')
# Other SQL queries here
connection.disconnect!
endI have a list of identical databases (running on distinct servers) that I have to connect to and collect some data. But I'm suspecting I'm doing something terribly wrong, as when this code gets executed, the ruby interpreter raises a Dropped DB Cursor exception.
Do you have any idea of what can be possibly causing this error?
Metadata
Metadata
Assignees
Labels
No labels