/etc/security/limits.conf
elasticsearch hard memlock 100000
/etc/default/elasticsearch
After having many deadlocks due to a high order volumne I've applied the these fixes to the core. Some can be found in a Magento forum. Before the fixes we could only process 1 order every 5-10 secs. Updating to Magento 1.8 is currently not an option but in 1-2 months.
Mage_Sales_Model_Abstract::_afterSave must be removed and replaced with afterCommitCallback. This is important to move the grid update (of sales_flat_order_grid) out of the transaction.
Rewrite the method of the Mage_CatalogInventory_Model_Observer::reindexQuoteInventory() to remove the price reindexing from the transaction. That index process will also be fired in event sales_model_service_quote_submit_success.
| SET FOREIGN_KEY_CHECKS=0; | |
| TRUNCATE `catalogsearch_fulltext`; | |
| TRUNCATE `catalogsearch_query`; | |
| TRUNCATE `catalogsearch_result`; | |
| -- | |
| -- Enterprise Edition | |
| -- |
| DELETE FROM catalog_category_entity_datetime WHERE `value` IS NULL; | |
| DELETE FROM catalog_category_entity_decimal WHERE `value` IS NULL; | |
| DELETE FROM catalog_category_entity_int WHERE `value` IS NULL; | |
| DELETE FROM catalog_category_entity_text WHERE `value` IS NULL; | |
| DELETE FROM catalog_category_entity_varchar WHERE `value` IS NULL; | |
| DELETE FROM catalog_product_entity_datetime WHERE `value` IS NULL; | |
| DELETE FROM catalog_product_entity_decimal WHERE `value` IS NULL; | |
| DELETE FROM catalog_product_entity_gallery WHERE `value` IS NULL; | |
| DELETE FROM catalog_product_entity_group_price WHERE `value` IS NULL; |
Step by step to install Scala + Play Framework in Ubuntu 14.04 with Activator.
Install Scala
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.6.deb
sudo dpkg -i scala-2.11.6.deb
sudo apt-get update
sudo apt-get install scala
| <?php | |
| class Orchid_CouponFix_Model_Observer | |
| { | |
| public function cancel($observer) | |
| { | |
| $resource = Mage::getModel('core/resource'); | |
| $db = $resource->getConnection('core_write'); | |
| $event = $observer->getEvent(); | |
| $order = $event->getPayment()->getOrder(); | |
| if ($order->canCancel()) { |
| <!-- Facebook Custom Audience Pixel Code - Placed on Every Page of Site --> | |
| <script> | |
| !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
| n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; | |
| n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; | |
| t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, | |
| document,'script','//connect.facebook.net/en_US/fbevents.js'); | |
| fbq('init', '{{facebook pixel}}'); | |
| fbq('track', 'PageView'); | |
| </script> |
Install Play Framework on Ubuntu 14.04
export ACTIVATOR_HOME=/usr/local/share/activator-dist-1.3.6
export PATH=$PATH:$ACTIVATOR_HOME/bin