mod_reqtimeout / RequestReadTimeout can't be configured for large file support
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- apache, docker
- 领域
- devops, infrastructure
调研方向
首先检查容器的 /etc/apache2/mods-enabled/reqtimeout.conf 以及现有的 APACHE_BODY_LIMIT 环境变量处理逻辑。将已配置的 RequestReadTimeout 值与文档中关于大文件上传的行为进行比较,然后验证大文件上传在 40 秒后不再失败,并确认容器仍可配置。
由索引模型根据 Issue 内容生成。
描述
Hey there,
I'm facing the issue that I am unable to upload large files on my nextcloud instance. After 40 seconds my upload times out and my local nextcloud clients crashes.
I'm hosting an Ansible MASH playbook, which I guess, isn't relevant.
As described in the documentation, mod_reqtimeout can cause large file uploads to fail.
It seems disabling the mod or changing its configuration seems crucial for fixing the timout issue. Furthermore, it seems the RequestReadTimeout setting is responsible for limiting the request time to 40 seconds (as shown below).
However, this isn't possible using the nextcloud container image.
Expected behavior
Large files should upload fluently.
Actual behavior
Large files fail to upload after 40 seconds due to a server timeout. The Nextloud Windows client crashes.
Additional information
Additional environment variables
Environment variables set via MASH-config:
nextcloud_container_additional_environment_variables: |
PHP_MEMORY_LIMIT=20G
PHP_UPLOAD_LIMIT=20G
PHP_OPCACHE_MEMORY_CONSUMPTION=1024
APACHE_BODY_LIMIT=0
Active php ini settings:
I have no name!@034f0a74c941:/var/www/html$ php -i | grep -E "memory"
memory_limit => 20G => 20G
Collecting memory statistics => No
opcache.memory_consumption => 1024 => 1024
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => Off => Off
I have no name!@034f0a74c941:/var/www/html$ php -i | grep -E "limit"
memory_limit => 20G => 20G
Total Links => 0/unlimited
ldap.max_links => Unlimited => Unlimited
mbstring.regex_retry_limit => 1000000 => 1000000
mbstring.regex_stack_limit => 100000 => 100000
memcached.item_size_limit => 0 => 0
memcached.sess_server_failure_limit => 0 => 0
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000
redis.pconnect.connection_limit => 0 => 0
session.cache_limiter => nocache => nocache
opcache.jit_bisect_limit => 0 => 0
Client Logfiles
2025-06-22 03:27:07:971 [ info nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\creds\webflowcredentials.cpp:406 ]: request finished
2025-06-22 03:27:07:971 [ warning nextcloud.sync.networkjob C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\libsync\abstractnetworkjob.cpp:223 ]: QNetworkReply::UnknownNetworkError "Der Schreibvorgang konnte nicht ausgeführt werden" QVariant(Invalid)
2025-06-22 03:27:07:971 [ warning nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\creds\webflowcredentials.cpp:207 ]: QNetworkReply::UnknownNetworkError
2025-06-22 03:27:07:971 [ warning nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\creds\webflowcredentials.cpp:208 ]: "Der Schreibvorgang konnte nicht ausgeführt werden"
2025-06-22 03:27:07:971 [ info nextcloud.sync.networkjob.put C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\libsync\propagateupload.cpp:96 ]: PUT of "https://SENSITIVE_DATA/1190532493/00001" FINISHED WITH STATUS "UnknownNetworkError Der Schreibvorgang konnte nicht ausgeführt werden" QVariant(Invalid) QVariant(Invalid)
2025-06-22 03:27:07:971 [ warning nextcloud.sync.propagator C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\libsync\owncloudpropagator.cpp:288 ]: Could not complete propagation of "allgemein/Marketing + Presse/ad-instagram-theaterfest.mov" by OCC::PropagateUploadFileNG(0x2f2c123f160) with status OCC::SyncFileItem::FatalError and error: "Der Schreibvorgang konnte nicht ausgeführt werden"
2025-06-22 03:27:07:977 [ info nextcloud.gui.activity C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\tray\usermodel.cpp:867 ]: Item "allgemein/Marketing + Presse/ad-instagram-theaterfest.mov" retrieved resulted in error "Der Schreibvorgang konnte nicht ausgeführt werden"
2025-06-22 03:27:07:982 [ info nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\creds\webflowcredentials.cpp:406 ]: request finished
2025-06-22 03:27:07:982 [ warning nextcloud.sync.networkjob C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\libsync\abstractnetworkjob.cpp:223 ]: QNetworkReply::OperationCanceledError "Operation abgebrochen" QVariant(Invalid)
2025-06-22 03:27:07:982 [ warning nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\creds\webflowcredentials.cpp:207 ]: QNetworkReply::OperationCanceledError
2025-06-22 03:27:07:982 [ warning nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\creds\webflowcredentials.cpp:208 ]: "Operation abgebrochen"
2025-06-22 03:27:07:982 [ info nextcloud.sync.networkjob.put C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\libsync\propagateupload.cpp:96 ]: PUT of https://SENSITIVE_DATA" FINISHED WITH STATUS "OperationCanceledError Operation abgebrochen" QVariant(Invalid) QVariant(Invalid)
2025-06-22 03:27:07:982 [ warning default unknown:0 ]: QIODevice::read (QNetworkReplyHttpImpl): device not open
2025-06-22 03:27:07:982 [ info nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\creds\webflowcredentials.cpp:406 ]: request finished
2025-06-22 03:27:07:982 [ warning nextcloud.sync.networkjob C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\libsync\abstractnetworkjob.cpp:223 ]: QNetworkReply::OperationCanceledError "Operation abgebrochen" QVariant(Invalid)
2025-06-22 03:27:07:982 [ warning nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\creds\webflowcredentials.cpp:207 ]: QNetworkReply::OperationCanceledError
2025-06-22 03:27:07:982 [ warning nextcloud.sync.credentials.webflow C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\gui\creds\webflowcredentials.cpp:208 ]: "Operation abgebrochen"
2025-06-22 03:27:07:982 [ info nextcloud.sync.networkjob.put C:\Users\User\AppData\Local\Temp\windows-31590\client-building\desktop\src\libsync\propagateupload.cpp:96 ]: PUT of "https://SENSITIVE_DATA" FINISHED WITH STATUS "OperationCanceledError Operation abgebrochen" QVariant(Invalid) QVariant(Invalid)
2025-06-22 03:27:07:983 [ warning default unknown:0 ]: QIODevice::read (QNetworkReplyHttpImpl): device not open
2025-06-22 03:27:07:983 [ warning default unknown:0 ]: QIODevice::read (OCC::UploadDevice): device not open
OCC System Config
{
"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
}
],
"upgrade.disable-web": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "31.0.6.2",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"overwriteprotocol": "https",
"overwritewebroot": "",
"auth.bruteforce.protection.enabled": false,
"maintenance_window_start": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_smtpsecure": "ssl",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"forbidden_filename_basenames": [
"con",
"prn",
"aux",
"nul",
"com0",
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"com\u00b9",
"com\u00b2",
"com\u00b3",
"lpt0",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"lpt\u00b9",
"lpt\u00b2",
"lpt\u00b3"
],
"forbidden_filename_characters": [
"<",
">",
":",
"\"",
"|",
"?",
"*",
"\\",
"\/"
],
"forbidden_filename_extensions": [
" ",
".",
".filepart",
".part"
],
"loglevel": 2,
"skeletondirectory": "",
"default_locale": "de_DE",
"default_phone_region": "DE",
"app_install_overwrite": []
}
}
/etc/apache2/mods-enabled/reqtimeout.conf
# mod_reqtimeout limits the time waiting on the client to prevent an
# attacker from causing a denial of service by opening many connections
# but not sending requests. This file tries to give a sensible default
# configuration, but it may be necessary to tune the timeout values to
# the actual situation. Note that it is also possible to configure
# mod_reqtimeout per virtual host.
# Wait max 20 seconds for the first byte of the request line+headers
# From then, require a minimum data rate of 500 bytes/s, but don't
# wait longer than 40 seconds in total.
# Note: Lower timeouts may make sense on non-ssl virtual hosts but can
# cause problem with ssl enabled virtual hosts: This timeout includes
# the time a browser may need to fetch the CRL for the certificate. If
# the CRL server is not reachable, it may take more than 10 seconds
# until the browser gives up.
RequestReadTimeout header=20-40,minrate=500
# Wait max 10 seconds for the first byte of the request body (if any)
# From then, require a minimum data rate of 500 bytes/s
RequestReadTimeout body=10,minrate=500
- 主要语言
- Shell
- 星标
- 7.4k
- 派生
- 1.9k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/docker 的其他 Issue
-
1. To develop bug feature: cron image
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
bug docs
难度 1/5 1 小时以内 新手友好度 72/100
-
0. Needs triage bug
难度 4/5 3-5 天 新手友好度 35/100
-
Imagick architecture mismatch (x86_64 vs aarch64) on official arm64 image causes Apache segfaults未关闭0. Needs triage bug
难度 4/5 3-5 天 新手友好度 50/100
相似的 Issue
-
area:install bug needs-triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
Netcracker/qubership-test-pipelines#307 ·
维护者通常 2 天内回复
-
Webcam overlay freezes during voxtype dictation while screen recording (pause_media pauses the overlay mpv)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
TYPO3BestPractices/tea#2409 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
msys2/MSYS2-packages#6825 ·
维护者通常 1 天内回复