When I import the first time a language package into a local web server installation I got the following error:

Fatal error: Maximum execution time of 240 seconds exceeded in
D:\WAMP\www\dru\includes\database\database.inc on line 2108

Is this a Drupal or a MySQL issue?

How EXACTLY can I increase the timeout period?

Peter

Comments

abhishek sawant’s picture

Can increase execution time in php.ini file where you can make the changes.

Abhishek Sawant
Drupal Developer

pstein’s picture

Hmm, I had a look into the suggested php.ini.

But I found no appropriate option where I can increase the time.
Even worse I didn't found a parameter with the value "240" at all.

Which parameter did you mean in detail?

Is it a php option or do I have to configure it in MySQL?

clashar’s picture

normally you should change
"max_execution_time" parameter in php.ini

but maybe your issue is related to po files importing:
http://drupal.org/node/569004

there seems to be 240 seconds issue

Anonymous’s picture

I had the same problem. The time limit is hard-coded in the drupal core. You find it inside the file includes/locale.inc

German readers might like to read about the solution in my blog.

webDev-2’s picture

Go to sites/all/modules/l10n_update/l10n_update.locale. Then open the file and find the line @set_time_limit(240);
change 240 to 3000 or any other number. It worked for me this way.

divillegas’s picture

In Drupal 7.16

Open the file:
mydirectoryexample\includes\locale.inc
for me line 635

function _locale_import_po($file, $langcode, $mode, $group = NULL) {
  // Try to allocate enough time to parse and import the data.
  drupal_set_time_limit(240);

change 240 to other number.

Denise_0523’s picture

@divillegas
It works for me , Thanks very much

son_of_flynn’s picture

Yep, still working, cheers!

james feng’s picture

This method is useful to me.

sushilck’s picture

You can simply add sites/default/settings.php.

ini_set('max_execution_time', 0);

Collins405’s picture

Thanks for this, it helped!

/chris