当前位置:网站首页>Apache站点下载大文件自动中断或者文件不完整
Apache站点下载大文件自动中断或者文件不完整
2022-08-09 02:21:00 【yutiedun】
解决方法
修改Apache配置文件httpd.conf
修改或添加以下内容
EnableMMAP off
EnableSendfile off
原因分析
原来在默认情况下,当处理一个请求并不需要访问文件内部的数据时(比如发送一个静态的文件内容),如果操作系统支持,Apache将使用sendfile将文件内容直接发送到客户端而并不读取文件。这个sendfile机制避免了分开的读和写操作以及缓冲区分配。由于默认是打开的,但有些操作系统对sendfile系统调用支持不够。所以会出现无法传输大于一定容量的html页面。关掉并不影响正常使用。
边栏推荐
猜你喜欢
HCIP-R&S By Wakin自用笔记(2)OSPF之OSPF回顾、虚连接
The first lesson of HNUMSC-C language
电磁辐射安全标准及检测方法
MT4/MQL4 entry to proficient foreign exchange EA tutorial Lesson 1 Getting to know MetaEditor
力扣刷题记录2.1-----27. 移除元素
Likou Brush Question Record 5.1-----59. Spiral Matrix II
历史最全DL相关书籍、课程、视频、论文、数据集、会议、框架和工具整理分享
[C language brush questions] Application of fast and slow pointers in linked lists
Mysql 5.7 into the pit
Force buckled brush problem record 7.1 -- -- -- -- -- 707. The design list
随机推荐
2022 China Eye Expo, China Beijing International Children and Adolescent Eye Health Industry Exhibition
JDBC technology (3) - use Druid database connection pool test
KQL和Lucene的区别
The 7 taboos of time management summarized by the postgraduate students, how many have you won?
力扣刷题记录4.1-----209. 长度最小的子数组
OpenMLDB + Jupyter Notebook:快速搭建机器学习应用
Go-11 - Process Control
虹科技术|如何阻止供应链攻击?
RF调试过程中现象一
年金险的安全性怎么样啊?可靠吗?
2022杭电多校第五场1007(生成函数+启发式合并+ntt)
Simple example of .reduce()
What is the difference between a project manager and a product manager?
.reduce()的简单例子
MT4/MQL4入门到精通外汇EA教程第一课 认识MetaEditor
配置文件的读取-TOML
【AspNetCore】实现JWT(使用Microsoft.AspNetCore.Authentication.JwtBearer)
增额终身寿险哪家最好呢?真的安全吗?
D. Tournament Countdown
Summary of pytorch related knowledge points