Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
J
jasette-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
jasette-facil
Validations
e7723ab6
Valider
e7723ab6
rédigé
il y a 8 ans
par
Eugen Rochko
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Add puma preloading, decrease DB pool size to size of threads per worker
parent
53fb7b1a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
config/database.yml
+1
-1
1 ajout, 1 suppression
config/database.yml
config/puma.rb
+4
-4
4 ajouts, 4 suppressions
config/puma.rb
avec
5 ajouts
et
5 suppressions
config/database.yml
+
1
−
1
Voir le fichier @
e7723ab6
default
:
&default
default
:
&default
adapter
:
postgresql
adapter
:
postgresql
pool
:
17
pool
:
<%= ENV["DB_POOL"] || ENV['RAILS_MAX_THREADS'] || 5 %>
timeout
:
5000
timeout
:
5000
encoding
:
unicode
encoding
:
unicode
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
config/puma.rb
+
4
−
4
Voir le fichier @
e7723ab6
...
@@ -30,7 +30,7 @@ workers ENV.fetch("WEB_CONCURRENCY") { 2 }
...
@@ -30,7 +30,7 @@ workers ENV.fetch("WEB_CONCURRENCY") { 2 }
# you need to make sure to reconnect any threads in the `on_worker_boot`
# you need to make sure to reconnect any threads in the `on_worker_boot`
# block.
# block.
#
#
#
preload_app!
preload_app!
# The code in the `on_worker_boot` will be called if you are using
# The code in the `on_worker_boot` will be called if you are using
# clustered mode by specifying a number of `workers`. After each worker
# clustered mode by specifying a number of `workers`. After each worker
...
@@ -39,9 +39,9 @@ workers ENV.fetch("WEB_CONCURRENCY") { 2 }
...
@@ -39,9 +39,9 @@ workers ENV.fetch("WEB_CONCURRENCY") { 2 }
# or connections that may have been created at application boot, Ruby
# or connections that may have been created at application boot, Ruby
# cannot share connections between processes.
# cannot share connections between processes.
#
#
#
on_worker_boot do
on_worker_boot
do
#
ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
ActiveRecord
::
Base
.
establish_connection
if
defined?
(
ActiveRecord
)
#
end
end
# Allow puma to be restarted by `rails restart` command.
# Allow puma to be restarted by `rails restart` command.
plugin
:tmp_restart
plugin
:tmp_restart
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter