Does Craft have a timeout setting for template requests?
Nothing directly in Craft, but you're probably looking for PHP's max_execution_time, which governs how long a PHP script is allowed to execute.  It defaults to 30 seconds.

You can edit that value from you php.ini file.