<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>排错 on Moxuan's Blog</title><link>https://blog.moxuan.de/tags/%E6%8E%92%E9%94%99/</link><description>Recent content in 排错 on Moxuan's Blog</description><image><title>Moxuan's Blog</title><url>https://i.postimg.cc/7hwBy7VS/calcr.png</url><link>https://i.postimg.cc/7hwBy7VS/calcr.png</link></image><generator>Hugo -- 0.154.3</generator><language>zh-cn</language><copyright>©2023-2026 moxuan</copyright><lastBuildDate>Tue, 15 Oct 2024 18:00:00 +0800</lastBuildDate><atom:link href="https://blog.moxuan.de/tags/%E6%8E%92%E9%94%99/index.xml" rel="self" type="application/rss+xml"/><item><title>服务莫名其妙退出？善用 journalctl 查看系统底层日志</title><link>https://blog.moxuan.de/posts/linux-journalctl-debug/</link><pubDate>Tue, 15 Oct 2024 18:00:00 +0800</pubDate><guid>https://blog.moxuan.de/posts/linux-journalctl-debug/</guid><description>&lt;p&gt;最近挂在后台的一个自己写的 Python 监控脚本老是莫名其妙挂掉，重新启动过段时间又没了。看它自己的输出也看不出什么问题。&lt;/p&gt;
&lt;p&gt;最后老老实实用系统级的日志工具来查。因为我是把它做成了 &lt;code&gt;systemd&lt;/code&gt; 的守护进程运行的，所以直接用 &lt;code&gt;journalctl&lt;/code&gt; 命令：&lt;/p&gt;</description></item><item><title>服务突然 502？排查 Linux 'Too many open files' 报错踩坑日记</title><link>https://blog.moxuan.de/posts/linux-too-many-open-files-fix/</link><pubDate>Wed, 28 Feb 2024 09:45:00 +0800</pubDate><guid>https://blog.moxuan.de/posts/linux-too-many-open-files-fix/</guid><description>&lt;p&gt;&lt;strong&gt;故障现场&lt;/strong&gt;
昨天半夜，挂在 VPS 上的一个高频采集脚本突然停止工作，Nginx 前端直接报 502 Bad Gateway。
登进服务器看了一眼 CPU 和内存，都非常空闲。去查服务的错误日志，发现满屏都是夺命报错：
&lt;code&gt;Accept error: accept: Too many open files&lt;/code&gt;&lt;/p&gt;</description></item></channel></rss>