This is a PHP issue not a Joomla issue!
Changein php.ini (on local or remote host (depending on your package) reachable via your phpMyadmin)= your php-configuration
Maximum Script Execute Time (s.): = 30 ( Maximum execution time of each script, in seconds) to 'false' or 300 or whatever.
- Save and Restart Apache (mandatory)
If you have no access to your php.ini (shared hosting for instance) you need to ask you host to increase the setting for you.
Alternatively you can do this in the script itself without needing to change php.ini by using the set_time_limit function.
See the online manual here:
and additional information :