Я следую инструкциям по настройке Phoenix здесь
Это мой dev.exs
файл:
use Mix.Config
# Configure your database
config :api, Api.Repo,
username: <username>,
password: <password>,
database: <dbname>,
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10,
timeout: 120_000,
queue_target: 5000,
queue_interval: 100_000
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :api, ApiWeb.Endpoint,
http: [port: 4000],
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: [
node: [
"node_modules/webpack/bin/webpack.js",
"--mode",
"development",
"--watch-stdin",
cd: Path.expand("../assets", __DIR__)
]
]
Когда я запускаю
ecto.create
Я получаю следующую ошибку:
The database for Api.Repo couldn't be created: connection not available and request was dropped from queue after 2994ms. You can configure how long requests wait in the queue using :queue_target and :queue_interval. See DBConnection.start_link/2 for more information
Насколько я знаю, я уже использую queue_target и queue_interval.Что я делаю не так?
Моя база данных работает.Я могу запустить
psql -U <username>
и получить доступ к консоли PSQL.
postgres-# \conninfo
You are connected to database postgres as user <username> via socket in "/var/run/postgresql" at port "5432".