The underlying error: cannot assign requested address
reason
In concurrent scenarios, the client frequently requests the port to establish a tcp connection, resulting in the port being exhausted.
Solution
Just execute root
sysctl -w net.ipv4.tcp_timestamps=1 Enable support for TCP timestamps. If this item is set to 0, the following setting does not work
sysctl -w net.ipv4.tcp_tw_recycle=1 indicates that the fast recycling of TIME-WAIT sockets in TCP connection is enabled
The above solution to the error of the gorm golang concurrent connection database is all the content I share with you. I hope you can give you a reference and I hope you can support me more.