Check some values

See ulimit , also per user
sudo su {user} 
#all limit
ulimit -a

#Ulimite -hard: 
ulimit -Hn

#Ulimite -Soft: 
ulimit -Sn
List open file per process or per user
lsof -p {pid}| wc -l
lsof -u {youruser} |wc -l
List Network connection per state
netstat -an|awk '/tcp/ {print $6}'|sort|uniq -c
List php-fpm process running
ps aux | grep php-fpm | wc -l

Apply Ulimit change

sudo vi /etc/security/limits.conf

*       soft    nofile  65000  //for all user
user  soft     nofile  5000 // for a specific user

Too many connection in time-wait

This should not be too problematic according source below. One solution will be to open the service on several port and balance connexion to several port.

Some source

https://www.netadmintools.com/art295.html
https://medium.com/@muhammadtriwibowo/set-permanently-ulimit-n-open-files-in-ubuntu-4d61064429a
https://app.getpocket.com/read/2383097919