(WURFL - PHP API) - update_cache set to "true" on a server with high traffic

Started on the old forum in July 2010 · view the original in the archive · old links redirect here

4 replies · 820 views · started 16 years ago · 2 min read

4 participants
iceaceman Newbie · 2 posts #1

SERVER SETUP:

  • LAMP

DEVICE DETECTION:

  • wurfl - php api

Server Lowest Traffic : 20 request per minute

PROBLEM : When wurfl started an auto update our server Load Average starts to fire up from 1.00 to 200.00, and eat up almost 90% of memory.

QUESTION:

  1. Does anybody here who encountered the same problem when auto_update set to true under wurfl_config.php?

  2. If it's true that the configuration on auto_update is the real culprit of Load Average fire up, what are the best practice or alternative to do an update on wurfl?

  3. On our apache log I saw this error which occurred after auto_update kick-in...

[Thu Jul 29 00:01:24 2010] [error] [client 124.105.12.35] Thu, 29 Jul 2010 00:01:24 +0800 [domU-12-31-39-04-2C-52 18383][parse] Trying to load XML patch file: ./sylph/wurfl_patch_29jun2010.xml
[Thu Jul 29 00:01:24 2010] [error] [client 124.105.12.35] Thu, 29 Jul 2010 00:01:24 +0800 [domU-12-31-39-04-2C-52 18383][parse] Loaded, now parsing
[Thu Jul 29 00:01:24 2010] [error] [client 124.105.12.35] Thu, 29 Jul 2010 00:01:24 +0800 [domU-12-31-39-04-2C-52 18383][parse] Updating device generic 
[Thu Jul 29 00:01:24 2010] [error] [client 124.105.12.35] Thu, 29 Jul 2010 00:01:24 +0800 [domU-12-31-39-04-2C-52 18383][parse] generic: setting config_instruction_id=default
[Thu Jul 29 00:01:24 2010] [error] [client 124.105.12.35] Thu, 29 Jul 2010 00:01:24 +0800 [domU-12-31-39-04-2C-52 18383][parse] generic: setting id=generic

....
.....

[Thu Jul 29 00:03:14 2010] [error] [client 124.105.12.35] Thu, 29 Jul 2010 00:03:14 +0800 [domU-12-31-39-04-2C-52 18378][parse] ERROR: Unable to remove ./sylph/tmp/sylph-data/agent2id.php4

Why I've got this error?

Here's the wurfl_config.php :

define("WURFL_CONFIG", true);
define("DATADIR", $Sylph . 'tmp/sylph-data/');
define("WURFL_PARSER_FILE", $Sylph . 'wurfl_parser.php');
define("WURFL_CLASS_FILE", $Sylph . 'wurfl_class.php');
define ("WURFL_FILE", $Sylph. "wurfl_21jun2010.xml");
define ("WURFL_LOG_FILE", DATADIR."wurfl_" . date('Y-m-d') . ".log");
define ("LOG_LEVEL", LOG_INFO);
define ("WURFL_USE_CACHE", true);
define ("WURFL_USE_MULTICACHE", false);
define ("CACHE_FILE", DATADIR."wurfl_cachefile.php");
define ("MULTICACHE_DIR", DATADIR."multicache/");
define ("MULTICACHE_TMP_DIR", DATADIR."multicache_tmp/");
define ("MULTICACHE_TOUCH", DATADIR."multicache.lockfile");
define ("MULTICACHE_SUFFIX",".php");
define ("WURFL_AUTOLOAD", true);
define ("WURFL_CACHE_AUTOUPDATE", true);
define ("WURFL_AGENT2ID_FILE", DATADIR."agent2id.php4");
define ("MAX_UA_CACHE", 50);
define("WURFL_PATCH_FILE", $Sylph . 'wurfl_patch_29jun2010.xml');
define("WURFL_PATCH_DEBUG", true);
GumSlone Administrator Principal · 1,690 posts #3

i had problems with wurfl a time ago (not because of autoupdate), the server crashed alway on my high traffic site where i have used it, so i have removed it.

if you use wurfl for redirects you should try other ways to redirect your mobile traffic.

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

iceaceman Newbie · 2 posts #5

firemax... after changing the file permissions no errors was recorded and server load is not firing-up. For now it's doing good because it survives our promo day where we received at least 50-60 request per minute which register 1.90 on our server load.

fyi... server is running 4 Dual-Core AMD Opteron(tm) Processor 2220 with 8gb memory

GumSlone & mobileGIGS.... using other software or customizing a new one is not possible at this time.

Anyway, thanks for the help guys!

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close