poll is waiting on the socket to get something sent to it. If there are a lot of waits, there can be a network latency issue. Usually I suspect the code as the culprit first, then look at the network.
And yes, if you routinely have 1+ second waits on receiving data, then something somewhere is way wrong.
First, the client tries to connect to the server using (probably) non blocking socket. Upon receiving EINPROGRESS, it then polls() on the socket for connection completion with a max timeout of 2s. Very soon, the connection completes. The clients set then various options on the socket, and calls again poll() with a timeout of 1471228.928s, which completes after 1.12s with event input data received. This is fine.
Question: Is the timeout of 1471228.928s really intended?
No, its not intented. in php mysql client timeout set to 4 secs only. So scripts should not wait more than 4 secs. i can see large number of delayed poll() calls, few are above 10 secs. Do you think its a bug in mysql client?
If the mysql interface you're using is well-known, chance is that either you made a mistake when using the interface or the interface has a (probably known) bug. If you can prove that everything you're doing everything right at your layer, but not at the layer below, then pass the ticket "down"