it fixes the issue Problem is solved. We hired an Oracle-expert to take a look at this and the problem was caused due to some underlying stored procedures that took a while to execute and consumed a lot of CPU.
Will socket connection stay open after php script execution completed?
like below fixes the issue If it's opened with fsockopen(), it will be closed when the script finishes. If you want the socket to persist between script executions, check out pfsockopen(), which is provided exactly for this usecase.
How to make the console output window stay open in Visual Studio 2015 stay open when extra input is given?
should help you out There is no limit in the TCP connection itself. Client and server could in theory stay connected for years without exchanging any data and without any packet flow. Problems are usually caused by middleboxes like NAT router or firewalls which keep a state and expire the state after some inactivity. Any new packets sent within the connection cannot be delivered then because no associated state exists anymore in the middlebox.
MySQL CPU increase when I have Sleeping connection that stay open