1. In Sp_configure, you will see "REMOTE QUERY TIMEOUTS" , by defualt is 600 , which is 10 minutes. You can increase this if needed. But if you increase to more time, that may allow lot of long running queries and affect performance.
2. If you are querying a Remote Server, then in Linked Server, in "Server Option", there are 2 settings "Connection Timeout" and "Query Timeout" . By default they are set to "0" which means no timeout for any queries. I hope you didnt change this to any value.