You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
please someone create issue about xhttp memory leak, i don't know chinese / Go lang and too lazy...
#7403
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nginx
CONFIG xray
COMMAND =
cat > /root/xray-mon.sh << 'EOF'
#!/bin/bash
LOG=/root/xray-mon.log
while true; do
PID=$(pgrep -xo xray)
RSS=$(awk '/VmRSS/{print int($2/1024)}' /proc/$PID/status)
THR=$(awk '/Threads/{print $2}' /proc/$PID/status)
C10K=$(ss -Htn state established '( sport = :10000 )' | wc -l)
C443=$(ss -Htn state established '( sport = :443 )' | wc -l)
GR=$(curl -s --max-time 5 "http://127.0.0.1:11111/debug/pprof/goroutine?debug=1" | head -n 1 | awk '{print $NF}')
HEAP=$(curl -s --max-time 5 "http://127.0.0.1:11111/debug/pprof/heap?debug=1" | grep -E '^# (HeapInuse|HeapIdle|HeapReleased) ' | awk '{printf "%s=%dMB ", $2, $4/1048576}')
echo "$(date '+%F %T') rss=${RSS}MB thr=$THR conn10000=$C10K conn443=$C443 gor=$GR $HEAP" >> $LOG
sleep 60
done
EOF
OUTPUT(trimmed 3 lines) =
COMMAND =
curl -s "http://127.0.0.1:11111/debug/pprof/goroutine?debug=2" | grep -oE '^goroutine [0-9]+ [[^]]*]' | sed -E 's/^goroutine [0-9]+ [//; s/]$//' | awk -F', ' '{m=$2+0; st=$1; if(m>60) old[st]++; all[st]++} END{for(s in all) print all[s]"\t>60min: "old[s]+0"\t"s}' | sort -rn
OUTPUT =
COMMAND =
curl -s "http://127.0.0.1:11111/debug/pprof/goroutine?debug=1" > /root/gor1.txt
OUTPUT FIRST BLOCK =
All reactions