First of: this isn’t a rant for AheadWorks: they offer great plugins which save us lots and lots of time.
However: there is something to mention here. When I was using the Blog and the Advanced Reports modules, I noticed a serious drop in performance in the backend. All of a sudden it took 10 seconds longer to load! Commenting out the awall_exts and awall_upds observers in app/code/local/AW/All/etc/config.xml seems to fix it. So what gives?
Of course it took me some debugging and backtracing to get to this point. By using the excellent AOE Profiler I quickly noticed that these two observers where taking massive time in the page load, but the memory usage was very low:
When you backtrace the call stack of this event, you’ll notice that some point AW_All_Model_Feed_Abstract::getFeedData() is called, which executes a cURL request to http://media.aheadworks.com/feeds/extensions.xml . Even though this function has a timeout set to 1 the error response of the curl request states that it waited 5 seconds for the timeout.
But why wasn’t my local development machine able to retrieve this file? When I open it in the browser it downloads in a jiffy!
It turns out that – since I always work from within Vagrant – my cURL request that was executed by PHP from within Vagrant couldn’t correctly resolve the host. Although I don’t know exactly why this is, it’s easily solved by adding the correct IP address of media.aheadworks.com manually to my /etc/hosts file in my Vagrant machine.
At the time of writing this is 18.104.22.168 , so my line in my hosts file looks like this:
But please note that when you run into the same problem and try to fix it to check if this IP-address is still correct.
Visitors give this article an average rating of 5.0 out of 5.
How would you rate this article?
★ ★ ★ ★ ★