Boost magento performances managing the two level cache

MagentoIf you are after some improvements on magento “speed”, you will probably interested in why it is so slow, a great explanation about why (a piece at least) magento is slow, is detailed here.

To sum it up, assuming you are using memcached to store the sessions (and I hope you do), here a small snippet to be applied to your app/etc/local.xml file to handle that second level cache:


As it is in the snippet, the second level is stored in the database instead of writing everything in the files as it does by default, using this (after restarting memcached) you will notice a huge boost in speed, you can also disable it by setting the slow_backend_store_data to 0, but that will slow down a lot the website when the cache is empty.


Magento Dataflow profiles with over 8k products

MagentoIf you are trying to export products from Magento’s Dataflow profile, and you have more than 8000 products, it is common to end up with an error 500 without many information.

To be able to handle that from the web interface without running a profile from the shell, you have to tell your fcgi to be patient!

Here is how to do so:

FcgidBusyTimeout 3600
FcgidIdleTimeout 3600
FcgidProcessLifeTime 7200

Here some more specific informations.


Export a profile from shell

MagentoI was struggling to run an export profile from the web interface of Magento without having any luck, increasing timeout or memory or anything was not helping at all.
Since I needed that export to be done, with this small script you can do that:

$profileId = 7; #The ID of the profile from the administration view
require_once 'app/Mage.php';
$profile = Mage::getModel('dataflow/profile');
$userModel = Mage::getModel('admin/user');
if (!$profile->getId()) {
 Mage::getSingleton('adminhtml/session')->addError('[ERROR] Invalid ID');
Mage::register('current_convert_profile', $profile);
$recordCount = 0;