当前位置:网站首页>【207】Apache崩溃的几个很可能的原因,apache崩溃几个
【207】Apache崩溃的几个很可能的原因,apache崩溃几个
2022-06-26 16:01:00 【米洛口】
近来网站访问量增加很快,于是出来一大堆问题,折腾了好几天,记下一些操作总结,共享之,先说说Apache崩溃的一些可能性和相应的处理方法,从最简单的排查:
1,磁盘空间不足
这是最容易忽视的问题,现在的磁盘便宜,一般人的机器磁盘的空间都是有很多剩余的,不要想当然的认为不是你磁盘空间的问题,也许是日志?或者是你的缓存文件突然吃光了你的磁盘呢?df -h一下很容易的事情,磁盘空间不足会造成很多怪异的现象,Apache进程不断堆积不释放,由于出现“could not make child process * exit,attemption to continue anyway…”之类的错误日志,最后Apache吃掉整个机器的内存,SSH不能登录,不能Reboot,不能Kill进程,,只能强行重启了
2,检查Apache的日志达到2G!!
通常对自己的日志都有一个大概的估计,但检查一下Apache的日志大小也是很有必要的,特别是Apache的Access日志,但近来一些极端无聊的所谓的垃圾人,不断扫描你的机器的目录,试图在你机器上下载你的Wwwroot.rar,下载你的Data.mdb,草,还在你的PHP的脚本目录里面扫描你的Upload.asp文件,(做个Rewrite,喂给这些扫描一些木马或者广告,呵呵,我就是这么干的),这样的垃圾人给Apache的Error日志产生很多垃圾信息。 如果Apache日志达到2G(限制),Apahce很可能出现一些无法解释的怪异的现象,Httpd进程无法启动,或者一启动,马上又停掉。
3,DDos攻击
通常这类的方法检查和处理比较麻烦,排除了你机器本身原因,Apache配置的原因,发现Apache的还是不停的崩溃,哪监测一下服务器网络连接情况,用脚本看一下连接情况:netstat -na|grep ESTABLISHED|awk ‘{print $5}’|awk -F: ‘{print $1}’|sort|uniq -c|sort -r -n,或者统计一下请求过多的的IP(netstat -an | grep -v LISTEN | awk ‘{print $5}’ | awk ‘BEGIN { FS=”:” } { Num[$1]++ } END { for(i in Num) if(Num[i]>8) { print i} }’ | xargs -i[] iptables -I INPUT -s [] -j DROP),直接封掉他们 ,对DDos通常是没有较好软防,如果资金允许,哪买好点的硬防吧。
我有执行上面的命令,可能就是执行上面的防止ip请求过多的情况。
对于DDos攻击,主机托管在外地,或者去机房不方便,哪就很难监测和处理,等你机器崩溃的时候,你远程SSH根本进不去了,郁闷之极。
Apache有一个防DDos的模块mod_evasive(mod_evasive的安装看这里),没法评价其效果,但至少可以帮你记录DDos过来的IP,实在太过份的DDos,哪直接报警。
边栏推荐
- 今年高考英语AI得分134,复旦武大校友这项研究有点意思
- JS教程之使用 ElectronJS、VueJS、SQLite 和 Sequelize ORM 从 A 到 Z 创建多对多 CRUD 应用程序
- IAR工程适配GD32芯片
- 1-12Vmware新增SSH功能
- 2 三种建模方式
- Ideal path problem
- JS text scrolling scattered animation JS special effect
- NFT transaction principle analysis (1)
- Development, deployment and online process of NFT project (2)
- Anaconda3 installation tensorflow version 2.0 CPU and GPU installation, win10 system
猜你喜欢

NFT Platform Security Guide (1)

手写数字体识别,用保存的模型跑自己的图片

How to identify contractual issues

Stepn débutant et avancé

李飞飞团队将ViT用在机器人身上,规划推理最高提速512倍,还cue了何恺明的MAE...

How to create your own NFT (polygon) on opensea

Net基于girdview控件实现删除与编辑行数据

Svg canvas canvas drag

5000 word analysis: the way of container security attack and defense in actual combat scenarios

This year, the AI score of college entrance examination English is 134. The research of Fudan Wuda alumni is interesting
随机推荐
JS教程之使用 ElectronJS 桌面应用程序打印贴纸/标签
Lifeifei's team applied vit to the robot, increased the maximum speed of planning reasoning by 512 times, and also cued hekaiming's Mae
Solidus labs welcomes zhaojiali, former head of financial innovation in Hong Kong, as a strategic adviser
9 Tensorboard的使用
Redis 迁移(操作流程建议)1
Angel 3.2.0 new version released! Figure the computing power is strengthened again
6 自定义层
Svg canvas canvas drag
Handwritten numeral recognition, run your own picture with the saved model
零知识 QAP 问题的转化
现在券商的优惠开户政策是什么?现在在线开户安全么?
【力扣刷题】二分查找:4. 寻找两个正序数组的中位数
R language uses cor function to calculate the correlation matrix for correlation analysis, uses corrgram package to visualize the correlation matrix, reorders rows and columns using principal componen
Simple use of tensor
7 user defined loss function
The details of the first pig heart transplantation were fully disclosed: human herpes virus was found in the patient, the weight of the heart doubled after death, and myocardial cell fibrosis
(一)keras手写数字体识别并识别自己写的数字
Solana扩容机制分析(2):牺牲可用性换取高效率的极端尝试 | CatcherVC Research
JS教程之Electron.js设计强大的多平台桌面应用程序的好工具
4 自定义模型训练