Author - Vinai Kopp

I am a passionate Web Developer and open source enthusiast since 1998. Today my main focus in on Training Developers how to customize Magento.
Since March 2008 I have specialized on the Magento platform, which, at the time, still was in the later Beta stages.
Working as a freelancer for my own clients and in large teams I was able to gather valuable experience in projects ranging from very small to quite large.
This enabled me to move into training Developers how to effectively customize Magento.
Since then I have spent thousands of hours giving trainings, both in-house and open to everybody, in all aspects of the Magento platform.

Since March 2010 I also am a Instructor for the official Magento U developer trainings for Magento.
I spent two years as an employed trainer for Magento, but decided I prefer the freedom to focus on projects I choses myself, and now work as a freelancer again since
January 2014.
I am a member of the Magento Certification Advisory Board and was one of the first to pass the MCD+ exam.
Also, I am an co-author of the German Magento Developer Handbook published by O'Reilly in 2010.

More Info » Follow me on Twitter »

Reader Comments (135)

  1. Paul Bates
    Paul Bates
    January 8, 2012 at 12:45 am /

    This must be fate, I and Rackspace have been struggling with our cron setup for days and unable to find a solution. Looking forward to Vinai’s thoughts here! Can you run the cron directly whilst the cache is enabled? http://mysite.com/cron.php?

    Reply
    1. Colin
      January 8, 2012 at 7:41 am /

      Are you running the cron job as the same user that runs the web server? E.g.:

      sudo -u www-data crontab -e

      Reply
  2. Jerome
    Jerome
    January 9, 2012 at 1:55 am /

    Hi,

    My cron job is configured via directadmin and they works but if i use code in local.xml

    [/code]
    apc
    myprefix_
    Netzarbeiter_Cache_Model_Symlink
    [/code]

    Cron arent scheduled and dont run...

    When i deleleted the code in my local.xml... cron are scheduled and runs again

    Reply
    1. Robert Popovic
      January 9, 2012 at 3:01 pm /

      When using APC with the Apache php executable, you need to add:

      apc.enable_cli = 1
      

      to your apc.ini (or php.ini) config file.

      Reply
      1. Robert Popovic
        January 9, 2012 at 3:08 pm /

        However, looking a Colins previous comment around this flag (apc.enable_cli = 1) it seems that this is not the best thing to do. The alternative is to create a cron job that will not use the php cli executable but do a curl or wget of your cron php script, ie:
        curl -s -o /dev/null http://www.yoursite.com/absolute/path/to/magento/cron.php

        Reply
        1. Vinai Kopp
          January 9, 2012 at 8:36 pm /

          Jerome, There are several possible reasons. I agree with Colins and Roberts comments. Please check var/log/*.log for possible explanations, and that you are using the latest version of the extension, in particular that Netzarbeiter_Cache_Model_Symlink::__construct looks exactly like here: https://github.com/Vinai/Symlink-Cache/blob/master/app/code/community/Netzarbeiter/Cache/Model/Symlink.php

          Reply
  3. Paul
    January 16, 2012 at 1:24 pm /

    Just a quick update on the cron issues as it maybe of some reassurance. Opting for the curl option on the direction of our RackSpace support team this works with the original Symlink.php file and crons are now running successfully. I have now updated the Symlink.php file as encouraged by Vinai and this too is running without issue.

    Reply
    1. Jerome
      Jerome
      February 1, 2012 at 10:30 pm /

      Hi Paul,

      How and which modifications to make for the file?

      My problem is APC because if i use apc in local.xml without slow backend, my cron dont work (symlink is not actived)

      Best regards

      Reply
      1. Vinai Kopp
        February 1, 2012 at 10:41 pm /

        Severa possibilites Jerome,

        1) set apc.enable_cli = 1 in you php.in (not recommended unless your crontab runs as the apache user)
        2) use the file cache backend for the cron calls with a different cache directory (fiddly to set up)
        3) use the curl option to call the Magento cron.php script (see the previous comments for more info)

        Reply
      2. Paul
        February 1, 2012 at 10:54 pm /

        Jerome,

        As Vinai suggests in point 3). “use the curl option to call the Magento cron.php script (see the previous comments for more info)”.

        If you google “setting CRON jobs with Curl” it will provide a clearer understanding.

        I asked our support team at RackSpace to set it up (cause we’re rubbish at that sort of stuff).

        Reply
  4. Magento - Une boutique plus rapide avec Soon_AdvancedCache

    [...] Intégration de Symlink Cache En savoir plus… [...]

  5. Ivar
    Ivar
    March 19, 2012 at 6:50 pm /

    How do i Uninstall the extension??
    Using the Magento Connect it generates:

    PHP Fatal error: Class ‘Netzarbeiter_Cache_Model_Symlink’ not found in …..

    Reply
    1. Vinai Kopp
      March 19, 2012 at 10:31 pm /

      Are you using the Compiler? Just reset the cache configuration in the app/etc/local.xml to get rid of it, then it won’t be used at all.

      Reply
  6. Hervé Guétin
    April 4, 2012 at 1:44 am /

    Dear Vinai,

    I just wanted to let you know that we have released a free / OS extension that extends Magento core cache features in which we have embedded (and credited!) your Symlink module. As we are a French agency, we have translated Symlink’s strings and you are very welcomed to extract them from app/locale/fr_FR/Soon_AdvancedCache.csv to add some translation to your module!

    The extension is here : http://www.magentocommerce.com/magento-connect/soon-advancedcache-une-boutique-plus-rapide-2351.html

    And, also for French readers of this post, we’ve written a blog post and complete user’s guide. The whole is available here : http://blog.agence-soon.fr/magento-une-boutique-plus-rapide-avec-soon_advancedcache/

    Hope this helps and may be useful.

    Reply
    1. Vinai Kopp
      April 4, 2012 at 9:12 am /

      Hi Hervé,

      nice to hear you are finding the extension useful. Please be aware that in some rare cases under high load flushing the whole cache causes a race condition where new inodes are created and the clean action never finishes.
      By the way, Colin Mollenhour published an alternative implementation taking the concept of indexing for the file cache meta data by using a file based index, which would avoid this issue. Also he generally improved the performance quite a lot, too.
      I suggest you look into bundling this backend with your extension instead of my symlink module: https://gist.github.com/2224457

      Reply
  7. fr0x
    fr0x
    April 20, 2012 at 3:55 am /

    Most solutions seem to indicate using APC or memcache. I assume both of those function in the same manner as the file caching? Or how do those compare in the tests you have run?

    Reply
    1. Vinai Kopp
      April 20, 2012 at 4:11 am /

      In a few days Colin will give a presentation at Imagine regarding these (and more) cache backends. I suggest waiting and then downloading the presentation for details and benchmarks.

      Reply
  8. Ralf
    April 27, 2012 at 10:24 pm /

    Vinai, do you have a link for that presentation?

    Reply
  9. Magento : Du changement dans l'air ! | Ecommerce Squad : le Ecommerce, coté technique

    [...] travail sur Redis n’aurait pas été possible sans Colin Mollenhour et Vinai Kopp qui ont fait un superbe boulot à plusieurs niveaux : la mise au point d’un outil de tests de [...]

  10. Aurelien
    April 26, 2013 at 7:25 pm /

    Thanks, got a big store with 3 views and the time to generate html just divide by 3. Great job :)

    Reply
  11. SR
    SR
    January 29, 2014 at 8:22 am /

    Just wanted to drop you a thank you. Coming across this article helped me understand why my site was performing so poorly, having implemented REDIS has cured the problem and has also improved overall performance.

    Reply

Add a Comment & Join the Discussion

Insert small snippets of code by using [code]{your_code_here}[/code]
For larger code blocks please use http://pastebin.com and paste your link.

You may also use the following HTML in your comment: <a href="" title=""> <abbr title="">
<acronym title=""> <blockquote cite=""> <cite> <em> <strike> <strong>