I recent migrate my database from Azure MSSQL to PostgreSQL on AWS on my Ruby on Rails application.
After deploying the application runs normally but after some small time, the application wasn't accessible anymore. That's no information on the logs of application or of the Puma. It's just freezing.
When I try to access the application from a web browser it continues loading the page and nothing came to logs.
I can fix it removing the socket and restarting Puma, but I'm pretty sure that's isn't the right solution.
I also change the adapter and the configuration on config/database.yml.
# PostgreSQL - RDS AWS
staging:
adapter: postgresql
host: my-instance.us-east-1.rds.amazonaws.com
database: my-db
username: my-user
password: my-password
port: 5432
pool: 5
timeout: 5000
connect_timeout: 5
read_timeout: 5
# MSSQL - Azure
#staging:
# adapter: sqlserver
# host: my-instance.database.secure.windows.net
# database: my-db
# username: my-user@my-db
# password: my-password
# port: 1433
# azure: true
# tds_version: 8.0
# mode: dblib
And I'm using Puma v3.9.1 with this configuration:
threads 2, 4
workers 0
on_worker_boot do
ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.establish_connection
end
end
Any ideas? Thank you!