Our API which is having 600 request per min access, the API setup is using two dedicated servers one for php process and second for mariadb. We are using 14 core, 128 ram servers for both.
The communication between api and database server is happening via local network, when ever there is large access towards api we have noticed two errors one on api larvel log and second on mysql server side.
production.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Maximum execution time of 60 seconds exceeded
[Warning] Aborted connection 48520867 to db: 'database-name' user: 'root' host: '172.16.1.2' (Got timeout reading communication packets)
We have managed to fix the api error by making two changes, php max_execution_time to 120 seconds and setting kernel parameter net.ipv4.tcp_tw_recycle = 1,
Once this is done we are now facing connection drop from our Office ISP with dedicated IP address, we have more than 100 users connecting from same IP.
Once the kernel parameter "net.ipv4.tcp_tw_recycle = 1" is disabled our office IP can access it cool. We already have "net.ipv4.tcp_tw_reuse = 1".
What is the possible solution for these ? I could also see a stackoverflow discussion which is almost similar to the same issue. But still unable to find a solution for the same.