Skip to content

Commit

Permalink
Fix pool sizes for all apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree committed Nov 19, 2018
1 parent 9066ff3 commit 63f3b2c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 31 deletions.
3 changes: 3 additions & 0 deletions apps/cf_atom_feed/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]

# Configure Postgres pool size
config :db, DB.Repo, pool_size: 1

# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs"
4 changes: 0 additions & 4 deletions apps/cf_atom_feed/config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@ use Mix.Config

config :cf_atom_feed, CF.AtomFeed.Router, cowboy: [port: 80]

config :db, DB.Repo,
adapter: Ecto.Adapters.Postgres,
pool_size: 2

# Do not print debug messages in production
config :logger, level: :info
3 changes: 3 additions & 0 deletions apps/cf_graphql/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]

# Configure Postgres pool size
config :db, DB.Repo, pool_size: 5

# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs"
3 changes: 3 additions & 0 deletions apps/cf_jobs/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ config :cf_jobs, CF.Jobs.Scheduler,
{"*/5 * * * *", {CF.Jobs.Moderation, :update, []}}
]

# Configure Postgres pool size
config :db, DB.Repo, pool_size: 3

# Import environment specific config
import_config "#{Mix.env()}.exs"
28 changes: 2 additions & 26 deletions apps/cf_opengraph/config/config.exs
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the parent project. For this reason,
# if you want to provide default values for your application for
# 3rd-party users, it should be done in your "mix.exs" file.
# Configure Postgres pool size
config :db, DB.Repo, pool_size: 1

# You can configure your application as:
#
# config :cf_opengraph, key: :value
#
# and access this configuration in your application as:
#
# Application.get_env(:cf_opengraph, :key)
#
# You can also configure a 3rd-party app:
#
# config :logger, level: :info
#

# It is also possible to import configuration files, relative to this
# directory. For example, you can emulate configuration per environment
# by uncommenting the line below and defining dev.exs, test.exs and such.
# Configuration from the imported file will override the ones defined
# here (which is why it is important to import them last).
#
import_config "#{Mix.env()}.exs"
3 changes: 3 additions & 0 deletions apps/cf_rest_api/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ config :cf_rest_api, CF.RestApi.Endpoint,
pubsub: [name: CF.RestApi.PubSub, adapter: Phoenix.PubSub.PG2],
server: true

# Configure Postgres pool size
config :db, DB.Repo, pool_size: 10

# Import environment specific config
import_config "#{Mix.env()}.exs"
2 changes: 1 addition & 1 deletion apps/db/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ config :db,
# Database: use postgres
config :db, DB.Repo,
adapter: Ecto.Adapters.Postgres,
pool_size: 20
pool_size: 3

# Import environment specific config
import_config "#{Mix.env()}.exs"

0 comments on commit 63f3b2c

Please sign in to comment.