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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    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...


    Code:
    [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 :

    Code:
    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);

    #2
    is this folder writable? "/sylph/tmp/sylph-data/"

    Free Mobile Web Scripts by me: Free Youtube Downloader, Tweets Reader, Facebook Wall Posts Reader
    PHP Tutorials: How to Secure Your PHP Script (PHP SECURITY)
    Want to Develop/Edit your WAP/Web Site? Add me to Gtalk (gmail) 'lakshan1989' or PM me.

    Comment


      #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

      Comment


        #4
        I was guna use WURFL for one of my projects bt 2 many issues i had to resort to coding one on my own.

        Comment


          #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!

          Comment

          Working...
          X