diff --git a/ee/audit/lib/audit/application.ex b/ee/audit/lib/audit/application.ex index 1b8f042f3..e2538c372 100644 --- a/ee/audit/lib/audit/application.ex +++ b/ee/audit/lib/audit/application.ex @@ -32,7 +32,7 @@ defmodule Audit.Application do children = filter_enabled_children(children) - opts = [strategy: :one_for_one, name: Audit.Supervisor] + opts = [strategy: :one_for_one, name: Audit.Supervisor, max_restarts: 1000] Supervisor.start_link(children, opts) end diff --git a/ee/gofer/lib/gofer/application.ex b/ee/gofer/lib/gofer/application.ex index d4d3b4e51..36bb6c250 100644 --- a/ee/gofer/lib/gofer/application.ex +++ b/ee/gofer/lib/gofer/application.ex @@ -13,7 +13,8 @@ defmodule Gofer.Application do def start(_type, _args) do Supervisor.start_link(Enum.filter(@children, &start_child?/1), strategy: :one_for_one, - name: Gofer.Supervisor + name: Gofer.Supervisor, + max_restarts: 1000 ) end diff --git a/ee/pre_flight_checks/lib/pre_flight_checks/application.ex b/ee/pre_flight_checks/lib/pre_flight_checks/application.ex index 2af3e7b4b..815430fb5 100644 --- a/ee/pre_flight_checks/lib/pre_flight_checks/application.ex +++ b/ee/pre_flight_checks/lib/pre_flight_checks/application.ex @@ -9,7 +9,7 @@ defmodule PreFlightChecks.Application do PreFlightChecks.Consumers ] - opts = [strategy: :one_for_one, name: PreFlightChecks.Supervisor] + opts = [strategy: :one_for_one, name: PreFlightChecks.Supervisor, max_restarts: 1000] Supervisor.start_link(children, opts) end end diff --git a/ee/rbac/lib/rbac/application.ex b/ee/rbac/lib/rbac/application.ex index 1fc3a5b8c..6c1891e45 100644 --- a/ee/rbac/lib/rbac/application.ex +++ b/ee/rbac/lib/rbac/application.ex @@ -18,7 +18,7 @@ defmodule Rbac.Application do |> add_task_supervisor() |> add_rabbit_workers() - opts = [strategy: :one_for_one, name: Rbac.Supervisor] + opts = [strategy: :one_for_one, name: Rbac.Supervisor, max_restarts: 1000] Supervisor.start_link(children, opts) end diff --git a/front/lib/front/application.ex b/front/lib/front/application.ex index 238e9193c..d5a1dea26 100644 --- a/front/lib/front/application.ex +++ b/front/lib/front/application.ex @@ -32,7 +32,7 @@ defmodule Front.Application do feature_provider(provider) ++ clients() - opts = [strategy: :one_for_one, name: Front.Supervisor] + opts = [strategy: :one_for_one, name: Front.Supervisor, max_restarts: 1000] unless Application.get_env(:front, :environment) in [:dev, :test] do {:ok, _} = Logger.add_backend(Sentry.LoggerBackend) diff --git a/github_notifier/lib/github_notifier/application.ex b/github_notifier/lib/github_notifier/application.ex index 71c5cd89a..fdf6bec7b 100644 --- a/github_notifier/lib/github_notifier/application.ex +++ b/github_notifier/lib/github_notifier/application.ex @@ -44,7 +44,7 @@ defmodule GithubNotifier.Application do {:ok, _} = Logger.add_backend(Sentry.LoggerBackend) Logger.configure_backend(Sentry.LoggerBackend, include_logger_metadata: true) - opts = [strategy: :one_for_one, name: GithubNotifier.Supervisor] + opts = [strategy: :one_for_one, name: GithubNotifier.Supervisor, max_restarts: 1000] Supervisor.start_link(children, opts) end diff --git a/guard/lib/guard/application.ex b/guard/lib/guard/application.ex index 52de3b972..fcc6253e3 100644 --- a/guard/lib/guard/application.ex +++ b/guard/lib/guard/application.ex @@ -32,7 +32,7 @@ defmodule Guard.Application do {:ok, _} = Logger.add_backend(Sentry.LoggerBackend) end - opts = [strategy: :one_for_one, name: Guard.Supervisor] + opts = [strategy: :one_for_one, name: Guard.Supervisor, max_restarts: 1000] Supervisor.start_link(children, opts) end diff --git a/hooks_processor/lib/hooks_processor/application.ex b/hooks_processor/lib/hooks_processor/application.ex index 8bf4fe052..2194e63a5 100644 --- a/hooks_processor/lib/hooks_processor/application.ex +++ b/hooks_processor/lib/hooks_processor/application.ex @@ -47,7 +47,7 @@ defmodule HooksProcessor.Application do :logger.add_handler(:sentry_handler, Sentry.LoggerHandler, %{}) - opts = [strategy: :one_for_one, name: HooksProcessor.Supervisor] + opts = [strategy: :one_for_one, name: HooksProcessor.Supervisor, max_restarts: 1000] Supervisor.start_link(children, opts) end diff --git a/notifications/lib/notifications/application.ex b/notifications/lib/notifications/application.ex index c4d5d9334..8347d0eec 100644 --- a/notifications/lib/notifications/application.ex +++ b/notifications/lib/notifications/application.ex @@ -21,7 +21,7 @@ defmodule Notifications.Application do Notifications.Workers.Destroyer ] ++ grpc_services() - opts = [strategy: :one_for_one, name: Notifications.Supervisor] + opts = [strategy: :one_for_one, name: Notifications.Supervisor, max_restarts: 1000] unless env() in [:dev, :test] do {:ok, _} = Logger.add_backend(Sentry.LoggerBackend) diff --git a/periodic_scheduler/scheduler/lib/scheduler/application.ex b/periodic_scheduler/scheduler/lib/scheduler/application.ex index 3e205c08a..d1fe8017f 100644 --- a/periodic_scheduler/scheduler/lib/scheduler/application.ex +++ b/periodic_scheduler/scheduler/lib/scheduler/application.ex @@ -13,7 +13,7 @@ defmodule Scheduler.Application do provider = Application.fetch_env!(:scheduler, :feature_provider) FeatureProvider.init(provider) - opts = [strategy: :one_for_one, name: Scheduler.Supervisor] + opts = [strategy: :one_for_one, name: Scheduler.Supervisor, max_restarts: 1000] get_env() |> children() |> Supervisor.start_link(opts) end diff --git a/plumber/block/lib/block/application.ex b/plumber/block/lib/block/application.ex index f7cb38c04..772e9b2b0 100644 --- a/plumber/block/lib/block/application.ex +++ b/plumber/block/lib/block/application.ex @@ -14,7 +14,7 @@ defmodule Block.Application do # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html # for other strategies and supported options - opts = [strategy: :one_for_one, name: Block.Supervisor] + opts = [strategy: :one_for_one, name: Block.Supervisor, max_restarts: 1000] get_env() |> children() |> Supervisor.start_link(opts) end diff --git a/plumber/ppl/lib/ppl/application.ex b/plumber/ppl/lib/ppl/application.ex index dd750f89f..a912fd10c 100644 --- a/plumber/ppl/lib/ppl/application.ex +++ b/plumber/ppl/lib/ppl/application.ex @@ -17,7 +17,7 @@ defmodule Ppl.Application do # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html # for other strategies and supported options - opts = [strategy: :one_for_one, name: Ppl.Supervisor] + opts = [strategy: :one_for_one, name: Ppl.Supervisor, max_restarts: 1000] (children(get_env()) ++ grpc_supervisor(get_env())) |> Supervisor.start_link(opts) end diff --git a/projecthub/lib/projecthub/application.ex b/projecthub/lib/projecthub/application.ex index dd9fe598d..c7b3574fc 100644 --- a/projecthub/lib/projecthub/application.ex +++ b/projecthub/lib/projecthub/application.ex @@ -45,7 +45,7 @@ defmodule Projecthub.Application do Logger.info("Starting: #{inspect(c)}") end) - opts = [strategy: :one_for_one, name: Projecthub.Supervisor] + opts = [strategy: :one_for_one, name: Projecthub.Supervisor, max_restarts: 1000] if env == :prod do {:ok, _} = Logger.add_backend(Sentry.LoggerBackend) diff --git a/public-api/v2/lib/public_api/application.ex b/public-api/v2/lib/public_api/application.ex index b8561c43b..a3c607296 100644 --- a/public-api/v2/lib/public_api/application.ex +++ b/public-api/v2/lib/public_api/application.ex @@ -15,7 +15,7 @@ defmodule PublicAPI.Application do # See http://elixir-lang.org/docs/stable/elixir/Supervisor.html # for other strategies and supported options - opts = [strategy: :one_for_one, name: PublicAPI.Supervisor] + opts = [strategy: :one_for_one, name: PublicAPI.Supervisor, max_restarts: 1000] Supervisor.start_link(children(Application.get_env(:public_api, :environment)), opts) end diff --git a/rbac/ce/lib/rbac/application.ex b/rbac/ce/lib/rbac/application.ex index 84b8925da..a9e227917 100644 --- a/rbac/ce/lib/rbac/application.ex +++ b/rbac/ce/lib/rbac/application.ex @@ -15,7 +15,7 @@ defmodule Rbac.Application do |> add_grpc_service() |> add_rabbit_consumers() - opts = [strategy: :one_for_one, name: Rbac.Supervisor] + opts = [strategy: :one_for_one, name: Rbac.Supervisor, max_restarts: 1000] Supervisor.start_link(children, opts) end diff --git a/repository_hub/lib/repository_hub/application.ex b/repository_hub/lib/repository_hub/application.ex index 3fd180374..5c40d95e5 100644 --- a/repository_hub/lib/repository_hub/application.ex +++ b/repository_hub/lib/repository_hub/application.ex @@ -26,7 +26,7 @@ defmodule RepositoryHub.Application do {{RepositoryHub.RemoteIdSyncWorker, remote_id_sync_worker_opts}, remote_id_sync_worker_enabled} ]) - opts = [strategy: :one_for_one, name: RepositoryHub.Supervisor] + opts = [strategy: :one_for_one, name: RepositoryHub.Supervisor, max_restarts: 1000] Supervisor.start_link(children, opts) end