If using a client wrapper library, take a look around the connection or configuration files. There might be a timeouts parameter that is set too low.
At one point, defaults would have been configured to reflect a limit along the lines of 7 to 10 seconds. Find and increase this timeout limit to a higher value. During really busy (volatile) markets, 2-3x is appropriate, which means 15-20 seconds in some cases.
Please note that this will not prevent Cloudflare timeouts, which may need to be checked.