Open GamerNoTitle opened 4 hours ago
附我现在正在使用的临时解决办法,使用了crontab任务
#!/bin/sh
# Path to log file
LOG_FILE="/var/log/ua3f.log"
# Keyword to search for in the log
KEYWORD="too many open"
# Check if the log file exists
if [ -f "$LOG_FILE" ]; then
# Get the last line of the log file
LAST_LINE=$(tail -n 1 "$LOG_FILE")
# Check if the last line contains the keyword
case "$LAST_LINE" in
*"$KEYWORD"*)
# Get the current timestamp in the format YYYY-MM-DD-HH-mm-SS
TIMESTAMP=$(date +"%Y-%m-%d-%H-%M-%S")
# Path to new log file in /root/ua3f/
NEW_LOG_FILE="/root/ua3f/ua3f-$TIMESTAMP.log"
# Move the original log file to the new location and rename it
mv "$LOG_FILE" "$NEW_LOG_FILE"
# Delete the original log file
rm -f "$LOG_FILE"
# Restart the ua3f service
service ua3f restart
;;
esac
fi
如果启动 UA3F 短时间内出现大量日志,说明出现流量回环,你需要检查你的 Clash 配置,让 Clash 不要接管本机网络流量
这个问题是不定时出现的,但是出现频率很高,经常用着用着就炸了,log文件我放下面,在大概21984行出现第一次
too many open files
ua3f-2024-09-23-10-30-00.log软路由信息
UA3F配置
OpenClash相关版本信息