Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议更新文档: 上传大文件的坑 #394

Open
muxik opened this issue Jan 18, 2025 · 0 comments
Open

建议更新文档: 上传大文件的坑 #394

muxik opened this issue Jan 18, 2025 · 0 comments

Comments

@muxik
Copy link

muxik commented Jan 18, 2025

使用think-swoole 在上传大文件的时候 无响应 多上传几次会导致nginx 502

在nginx 和 php.ini 配置正常的情况下需要注意

Swoole 的默认 package_max_length 通常为 2M,如果文件超过这个大小,可能会被直接丢弃。

'http' => [
...
'options' => [
'package_max_length' => 50 * 1024 * 1024
],
],

增加 package_max_length 可以解决此问题 ,建议官方更新 options 相关的文档

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant