Apache mpm prefork config mismatches postgres default max connections
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 28/100
Línea de trabajo
Comienza examinando la configuración de Apache prefork, especialmente MaxRequestWorkers, junto con el límite de conexiones de PostgreSQL 13 en el despliegue de Docker. Reproduce el agotamiento de conexiones al explorar almacenamiento externo y, a continuación, verifica que los límites elegidos persistan tras reiniciar los contenedores sin impedir el funcionamiento normal de Nextcloud.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hello everyone,
first of all my configuration:
I am running the latest version of the docker image on my TrueNAS Scale instance as an automatically deployed app that comes with a postgres DB (Postgres 13) and the nextcloud container running apache service.
The output of occ config:list system is included below.
The issue I have run into is nextcloud logging that all database connections are used up and any further connections are reserved for super users. This issue came up during browsing of external storage content with folders including hundreds of photos.
I believe the misconfiguration is in the apache mpm prefork config that defaults to something like this:
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxRequestWorkers: maximum number of server processes allowed to start
# MaxConnectionsPerChild: maximum number of requests a server process serves
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 150
MaxConnectionsPerChild 0
while the postgres instance per default only allows up to 100 connections total.
The idea from ChatGPT was to reduce the MaxRequestWorkers from 150 to 50, but effectively one could also increase the amount of connections postgres handles from 100 to ~160 (-3 reserved for superuser) for example.
In my case I will change the postgres setting as the apache setting does not persist across container restarts, but a permanent solution to this issue would be great!
Here now the content of the command occ config:list system:
{
"system": {
"htaccess.RewriteBase": "\/",
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"upgrade.disable-web": true,
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "31.0.7.1",
"forwarded_for_headers": [
"HTTP_X_FORWARDED_FOR"
],
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"overwrite.protocol": "https",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
"loglevel": 2,
"maintenance": false,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"127.0.0.1",
"localhost",
"nextcloud",
"***REMOVED SENSITIVE VALUE***"
]
}
}
- Lenguaje dominante
- Shell
- Estrellas
- 7.4k
- Forks
- 1.9k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextcloud/docker
-
1. To develop bug feature: cron image
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Drop paragarph about anonymous (unnamed) volumes under Persistent Storage section fo the docsAbiertobug docs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
0. Needs triage bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Imagick architecture mismatch (x86_64 vs aarch64) on official arm64 image causes Apache segfaultsAbierto0. Needs triage bug
Dificultad 4/5 3-5 días Aptitud para principiantes 50/100
Todos los issues de nextcloud/docker
Issues similares
-
[cifuzz] "Minimizing crashes reduces fuzzing time" is logged for every batch run, even with minimize-crashes offPosiblemente ocupada @martinfrancois la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
alunduil/alunduil-chezmoi#914 ·
Los mantenedores suelen responder en 1 día
-
cao-evolution cao-evolution:compiler-security
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
githubnext/gh-aw-cao#17586 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día