You can change the timeout in the connection string for SqlServer to wait for the connection by adding
;timeout=60
to the connection string.
You can also set the
cmd.CommandTimeout=60;
Default is 30 seconds.. Better not to set it as infinite timeout (value as 0).
Try increasing the last of these until the SP runs. As a Last resort, use 0 (zero = infinite) since this would indicate there might be another problem.