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

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos Blog

error 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 error 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服务