set max execution time to 0 so that it will not through timeout error...but you need to optimize your code or query to get records.
max_execution_time(0);
In SugarCRM 7.6, theres a new configuration to override api.timeout
$sugar_config['api']['timeout'] = 180; //default 3 minutes
so i need to override the time to a higher value for me to avoid the Request timeout error :-)