我如何更改 heroku 数据库/托管

how can i change heroku databse / hosting

我想将我的 heroku 数据库更改为允许并发连接的数据库,因为我的网站正在获得一些流量并且在多个用户尝试访问该网站时似乎崩溃了。我已经考虑将我的数据库更改为独角兽,但不确定这是否是我真正需要的。我是初学者,对我需要做什么的任何见解都将非常有用!

我的宝石文件:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc
gem 'bootstrap-sass'

group :production do 
    gem 'pg'
    gem 'rails_12factor'    
end

group :development, :test do
    gem 'sqlite3'
end

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]

设置 puma 非常简单。按照以下步骤操作:https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server

也就是说,我会深入挖掘。换成 puma 无论如何都是值得的,但这可能不是问题的根源。应用程序可能因多种原因而崩溃。

这里还有 puma 文档,以防万一:https://github.com/puma/puma