Can't "update database from a remote repository"

The API formerly known as Tera-WURFL
laurah
Posts: 1
Joined: Wed Jul 18, 2012 4:51 pm

Can't "update database from a remote repository"

Postby laurah » Wed Jul 18, 2012 4:54 pm

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?

kamermans
Posts: 393
Joined: Mon Jun 06, 2011 9:50 am

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

Postby kamermans » Wed Jul 18, 2012 8:21 pm

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
Thanks,

Steve Kamerman
ScientiaMobile

Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!


Who is online

Users browsing this forum: No registered users and 3 guests