Hi. I'm having trouble importing .bc files. Tried importing the KJV file (4,414 KB) The error message that came was: Fatal error: Maximum execution time of 240 seconds exceeded in C:\wamp\www\drupal-project\includes\database.mysqli.inc on line 108. As little as I know, this is related to PHP Timeout limit, which should be changeable.

Running Drupal 6.2, WAMPServer 2 (Apache 2.2.8, PHP 5.2.6, MySQL 5.0.51b)

Changes I tried in php.ini file:
mysql.connect_timeout = -1

Changes I tried in .htaccess file:
php_value max_execution_time 0

Changes I tried in modules\node\node.module file (line 2298):
set_time_limit(3000);

Tried each of them, but the same error message (240 seconds). Bible import finished partially (only +/- 7000 verses, exact number varies in each attempt)

Any other leads on a setting to look at? Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gpk’s picture

You need to make sure that the time limit is 3000 (or perhaps better 0 = unlimited) when the import actually runs. It's easy enough to try to change it but either have it reset by Drupal or (more likely in this case) the module itself (though I'm not familiar at all with this module), or, think you've changed it when in fact you haven't. Line 2298 of node.module only runs when node access permissions are being rebuilt. This only happens if you are using or have used a (contrib.) node access module. If you *are* using one then just turn it off for now ... Probably though your edit of node.module had no effect.

As a workaround you'd probably do better to add the set_time_limit in the database.mysqli.inc file before line 108, just make sure you change it back later ...

rish001’s picture

Hi. I was facing a very similar error message when I was trying to access the Modules under Site Building.
Running Drupal 6.2 on WAMP (Apache 2.2.8, PHP 5.2.6 and MySQL 5.0.51b)

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\includes\database.mysqli.inc on line 108

Solution:
Basic manipulation in the php.ini file did the trick for me.
File to be manipulated: php.ini
Original: max_execution_time = 30
Modified: max_execution_time = 3000

Mere increase in the execution time of the script works fine for me now.
Hope it helps! Thanks.

MikeLee_Birdy’s picture

Dear All:
I've try to cut .bc file into smaller files so that we can solve this import time out problem. Could anyone help me to test these files: download and unzip them; put bible.module to /modules/bible ; import .bc in the .1,.2,.3 ... order.
If this works, I'll try to convert more .bc for ppl who encounter this problem. Thanks for all who helps.
MikeLee

idontunderstand’s picture

mike

I tried importing these files in the 1,2,3 order but it didnt work, I got the first five books and that was it....maybe if i can actually locate the code in my database file then I can change the timeout or file size allowed, i cant manage to find it by using just the line number

Chris

MikeLee_Birdy’s picture

Dear Chris:
I've answer this question in http://drupalbible.mikelee.idv.tw/?q=node/52#comment-41 . Please try and let me know if this works.
MikeLee

gpk’s picture

Are comments only visible on that site to authenticated users?

Seems to me like the batch API is crying out to be used on a big import job like this - this is exactly why it was created, and would avoid having to do multiple manual imports. See http://api.drupal.org/api/group/batch/6 and http://drupal.org/node/180528. Also you can easily get it to display a nice progress bar :-)

MikeLee_Birdy’s picture

Dear gpk:
I love this batch function.... But this can only used in D6. I don't have D5 solution also...
MikeLee

gpk’s picture

Ah, sorry, missed that!

pkiff’s picture

Reviving this old thread to provide an alternate solution to a problem that is probably common.

I had a similar problem to this using both a MAMP install (on a Mac OSX system) and a WAMP system (on XP SP2). Apparently, in some cases, phpMyAdmin actually overrides the timeout settings that you have set elsewhere for your server. The solution described in a blog post on this topic by Akshay Jain resolved the issue for me:
http://akshayjain.org/blog/2008/08/error-maximum-execution-time-exceeded/

From that blog posting:

The problem arises because PHPMYADMIN overrides the settings of the server and to resolve this error the configuration file to PhpMyAdmin needs to be edited.

So, look into
/var/www/html/phpMyAdmin-2.6.1/config.inc.php (for linux servers )
or
C:\wamp\apps\phpmyadmin2.11.6\config.inc.php (for windows servers)

NOTE: The paths can vary slightly depending on your configuration.

When you have opened that config file, there is a variable called
$cfg['ExecTimeLimit']

Just change this variable to 0 (for unlimited) or to a sufficiently large number.

I would add that for typical MAMP installs, the config file is here:
Applications/MAMP/bin/phpMyAdmin/config.inc.php

This is not a solution that I would use on an actual production server available to the public as the timeouts are there for a reason, but when you are just working on your local copy for development purposes, I don't see any reason not to eliminate the time limit altogether.

Phil.

Kriss-dupe’s picture

Status: Active » Fixed

Been here too long, clearing up for efficiency. Change the timeout in the .module file.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.