-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 8.5.0, 9.0.0
-
Component/s: Editor - Synchrony, Server - Performance
-
None
-
2
-
Severity 2 - Major
-
1
Issue Summary
In Confluence 8.5.x+, Confluence's heartbeat http requests to synchrony every 3 seconds are not being closed correctly, causing the opened sockets to increase every 3 seconds.
Steps to Reproduce
In Confluence 8.5.x and later:
- Find the pid of confluence process
- Create a shell script as below based on system type. and add execution permission to it (chmod +x )
- Run below shell script with the above pid
- You will notice that the socket number is increasing every 3 seconds
linux env
#!/bin/bash PID=$1 THRESHOLD=100 # warning threshold if [ ! -d "/proc/$PID/fd" ]; then echo "process $PID not exists or no permission" exit 1 fi while true; do socket_count=$(sudo ls -l /proc/$PID/fd 2>/dev/null | grep -c 'socket:\[') echo "$(date): PID $PID current open socket number: $socket_count" if [ "$socket_count" -gt "$THRESHOLD" ]; then echo "⚠️ warning: socket over threshold $THRESHOLD!" fi sleep 2 done
mac env
#!/bin/bash PID=$1 THRESHOLD=100 # warning threshold while true; do socket_count=$(lsof -p $PID | grep '8091' | wc -l) echo "$(date): PID $PID current open socket number: $socket_count" if [ "$socket_count" -gt "$THRESHOLD" ]; then echo "⚠️ warning: socket over threshold $THRESHOLD!" fi sleep 2 done
Expected Results
The sockets are automatically closed and do not accumulate
Actual Results
Sockets accumulate until garbage collection clears them out. Triggering garbage collection can also clear the sockets on demand.
Workaround
increase the maximum open file limit if needed