This kind of timeout error can be corrected are likely to increase the time limit using ini_set. Additionally, you may also need to include set_time_limit.

ini_set( 'default_socket_timeout', 120 );
set_time_limit( 120 );