Page 1 of 1

Can't "update database from a remote repository"

Posted: Wed Jul 18, 2012 4:54 pm
by laurah
Hitting the "update database from a remote repository" link on the WURFL DB API 1.4.0 Administration screen, I get the following error:

Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/mobile/Tera-Wurfl/DatabaseConnectors/TeraWurflDatabase_MongoDB.php on line 131


For the record, line 131-3:
foreach ($res as $device) {
$data[$device['deviceID']] = $device['user_agent'];
}

I'm not sure what's taking so long in this script. Is it just a matter of granting the script more time, or is something terrible happening?

Re: Can't "update database from a remote repository"

Posted: Wed Jul 18, 2012 8:21 pm
by kamermans
First, 30 seconds is not an unusually long time for the DB to be loaded into MongoDB. I will look at where the maximum time is being set, but I imagine this 30 sec is the default in your php.ini file. I think it is set in the command line loader, so you may want to give this a try:

Code: Select all

php admin/cmd_line_admin.php --update=remote
Another thing that can significantly increase the reload time is when you have a lot of cached user agents. I'd recommend clearing your cache when you reload the WURFL to improve performance. You can do both of these in the same step from the command line like this:

Code: Select all

php admin/cmd_line_admin.php --clearCache --update=remote