我想將我的Herokuku數據庫更改爲允許併發連接的功能,因爲我的網站正在獲取一些流量,並且在多個用戶嘗試訪問該網站時似乎崩潰。我已經考慮改變我的數據庫到獨角獸,但不知道這是我真正需要的。我是一名初學者,對於我需要做什麼的深入瞭解將非常有用!我該如何更換Heroku數據庫/託管
我的Gemfile:
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]
獨角獸不是一個數據庫,它是一個應用程序服務器。這個問題不太可能是你的數據庫。運行heroku logs -t並嘗試將崩潰重現爲開始調試問題的地方。是什麼讓你相信數據庫是問題所在。如果你正在考慮改變應用服務器,美洲獅是一個不錯的選擇,並且通常會比獨角獸提供更好的性能。 Heroku現在推薦美洲獅。 – toddmetheny
啊哈,是可怕的措辭!我想將我的應用服務器更改爲美洲獅。有沒有辦法做到這一點不是太可怕的技術?我的github是https://github.com/westche/drinkPGH – westman2222
轉移到下面的答案。 – toddmetheny