惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
Y
Y Combinator Blog
Recorded Future
Recorded Future
博客园 - Franky
I
InfoQ
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Cloudbric
Cloudbric
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Check Point Blog
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
U
Unit 42
N
Netflix TechBlog - Medium
The Cloudflare Blog
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
B
Blog
S
Securelist
H
Hacker News: Front Page
Google Online Security Blog
Google Online Security Blog
G
Google Developers Blog

问题库 on 打工人日志

k8s master 节点 Unauthorized kindle 邮件发送失败,错误代码E999 SELinux 问题:导致端口无法创建,无法访问 解决Elasticsearch索引只读(read-only) Linux 系统收包流程以及内核参数优化 Vue3 + vite + nginx项目部署后404问题 githubAction set-output弃用错误 k8s CNI 问题 连接认证失效 k8s.gcr.io国内无法连接解决方法 K8S 问题排查:cgroup 内存泄露问题 docker 问题处理 安装 docker 出现 ERROR: Unsupported distribution 'ol' 问题
linux服务器进程打开文件过多导致服务异常
2023-11-07 · via 问题库 on 打工人日志

背景

我的logstash是多管道部署结果发现有大量日志丢失的情况查看logstash日志出现了以下报错

[2023-11-07T09:43:38,492][ERROR][logstash.javapipeline ][log] Pipeline worker error, the pipeline will be stopped {:pipeline_id=>“log”, :error=>"/var/lib/logstash/queue/log/checkpoint.head.tmp (Too many open files)", :exception=>Java::JavaIo::FileNotFoundException, :backtrace=>[“java.base/java.io.FileOutputStream.open0(Native Method)”, “java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)”, “java.base/java.io.FileOutputStream.(FileOutputStream.java:237)”, “java.base/java.io.FileOutputStream.(FileOutputStream.java:187)”, “org.logstash.ackedqueue.io.FileCheckpointIO.write(FileCheckpointIO.java:105)”, “org.logstash.ackedqueue.Page.headPageCheckpoint(Page.java:202)”,

这个问题是 Logstash Pipeline 在处理数据时报错,原因是打开文件过多导致"Too many open files"

解决方法

1. 检查操作系统的文件打开数量限制,使用ulimit -n查看。如果太低,可以提高这个限制

打开 /etc/profile 增加ulimit 值

1vim /etc/profile
2## 增加,保存并退出
3ulimit -n 10240
4# 重载配置
5source /etc/profile

2. 适当增大Logstash的heap size,如-Xms和-Xmx设置为2g。

1vim /etc/logstash/jvm.option
2# 修改参数
3-Xms 2g
4-Xmx 2g
5# 重启logstash服务