If you know the problem, PF does have the default settings. man checked PF. conf and found the cause.
# Pfctl-
***************************************
Timeouts:
TCP. First 30 s
TCP. Opening 5S
TCP. Established 18000 s
TCP. Closing 60 s
TCP. finwait 30 s
TCP. Closed 30 s
TCP. tsdiff 10 s
UDP. First 60 s
UDP. Single 30 s
UDP. Multiple 60 s
ICMP. First 20 s
ICMP. Error 10 s
Other. First 60 s
Other. Single 30 s
Other. Multiple 60 s
Frag 30 s
Interval 10 s
Adaptive. Start 6000 states
Adaptive. End 12000 states
SRC. Track 0 s
Limits:
States hard limit 10000
Src-nodes hard limit 20000
Frags hard limit 5000
Tables hard limit 10000
Table-entries hard limit 100000
OS fingerprints:
696 fingerprints loaded
***************************************
Frags hard limit 5000 sets the maximum number of connections for a single node (IP) to 5000.
So I added the following settings to PF. conf to optimize the default settings of PF.
Set limit States 200000.
Set limit frags 200000
Set limit Src-nodes 20000
Set limit tables 100000
Set limit table-entries 100000
Set Optimization aggressive
***************************************
Limits:
States hard limit 200000
Src-nodes hard limit 20000
Frags hard limit 200000
Tables hard limit 100000
Table-entries hard limit 100000
***************************************
In this way, there will be no problem. The connection will go smoothly to 10000. Other new users, or stupid ones like me, will be taken as a warning in the future.