Apache mpm prefork config mismatches postgres default max connections
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/100
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra các thiết lập Apache prefork, đặc biệt là MaxRequestWorkers, cùng với giới hạn kết nối PostgreSQL 13 trong quá trình triển khai Docker. Tái hiện tình trạng cạn kiệt kết nối khi duyệt bộ nhớ ngoài, sau đó xác minh rằng các giới hạn đã chọn vẫn được duy trì sau khi khởi động lại các container mà không ngăn cản Nextcloud hoạt động bình thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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***"
]
}
}
- Ngôn ngữ chính
- Shell
- Star
- 7.4k
- Fork
- 1.9k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nextcloud/docker
-
1. To develop bug feature: cron image
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Drop paragarph about anonymous (unnamed) volumes under Persistent Storage section fo the docsĐang mởbug docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
0. Needs triage bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Imagick architecture mismatch (x86_64 vs aarch64) on official arm64 image causes Apache segfaultsĐang mở0. Needs triage bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
Tất cả issue của nextcloud/docker
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
Route 53 DNS analytics/insights adds an observability signal for the DNS layerCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdocumentation enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Set wallpaperĐang mởnew-addition
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 60/100
-
needs-triage Platform(Default)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
winapps-org/winapps#984 ·