无论设置正确与否,PHP 连接都会在大文件上传时重置
我遇到了一个非常常见的问题,似乎找到的所有可用解决方案都不起作用。
我们有一个接收大量流量的 LAMP 服务器。使用此服务器,我们执行定期文件提交上传。在小文件上传时,它工作得很好。对于大约 4-5MB 的文件,此提交上传会间歇性失败(有时有效,但很多时候失败)。
我们的 PHP 上有以下配置:
max_input_time: 600
max_execution_time: 600
max_upload_size: 10M
post_max_size: 10M
Apache 设置:
Timeout: 600
Keep-Alive Timeout: 15
Keep-Alive: On
Per Child: 1000
Max Conn: 100
因此,我想知道是否有人可以帮助我解决这个问题。我们在网上找到了问题和解决方案,但没有一个适用于我们的案例。
太感谢了。非常感谢任何意见/反馈!
I am having a very common problem which it seems that all the available solutions found are not working.
We have a LAMP server which is receiving high amount of traffic. Using this server, we perform a regular file submission upload. On small file uploads, it works perfectly. On files of around 4-5MB, this submission upload failed intermittently (sometimes it works but many times it failed).
We have the following configuration on our PHP:
max_input_time: 600
max_execution_time: 600
max_upload_size: 10M
post_max_size: 10M
Apache setting:
Timeout: 600
Keep-Alive Timeout: 15
Keep-Alive: On
Per Child: 1000
Max Conn: 100
Thus, I wonder if anyone can help me with this. We have found the issues and solutions online but none of them work in our case.
Thank you so much. Any input / feedback is much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
连接可能会在几个地方终止:
我会增加所有这些,看看它是否仍然存在。但是您必须反弹 apache 才能使 php.ini 内部的更改生效。
这些还受到最终用户的连接速度的影响,如果某些用户失败,那是因为他们的连接速度比其他人慢,并且他们与服务器的连接正在终止。
The connection coud be terminating at several places:
I would increase all of these, and see if it still persists. But you will have to bounce apache for the changes inside of php.ini to take affect.
These are also affected by what kind of connection speed the end user has, if it is failing for certain users, it's because their connection is slower than others, and their connection with the server is terminating.