Jump to content

 

Offline

Member Since 13 Oct 2009
Offline Last Active Feb 21 2019 01:21 PM
-----

#197397 Cs-Cart Slow

Posted by Offline on 19 November 2014 - 02:52 PM

Ever since we have upgraded to the latest version of CS-Cart it has been slow. The load time for a product is between 4 to 10 seconds. I was wondering if anyone was for hire out here that could take a look at our setup and see if it could be tweaked. We are running some pretty built servers but I see the mysql slow log continueing to grow at an alarming rate.

If anyone is interested please let me know. I obviously will pay for the service.

Thanks,

Chris


#134508 memcached

Posted by Offline on 09 April 2012 - 12:38 AM

The holiday weekend made our sites really busy and the slow site became unusable for our customers. I found a PHP/Mysql expert who fixed the problem for me. I wanted to share his final fix. This is the best preformance enhancer for cs-cart I have ever found!

We have 49,000+ products and good traffic to the site. It seems the session data has a tendency to lock up the database because it was over 500,000 rows. We moved the session data to memchache and my load average went from 5.0 to 10.0 down to .50 .

1. install memcache
yum install memcached

2. when it done. checking version and working.
memcached -h

3. Starting it.
/etc/init.d/memcached restart

4. edit memcache settings.
vi /etc/sysconfig/memcached

5. Allow to use 1Gb of ram for caching.
CACHESIZE="1024"

6. add memcached to server startup
/sbin/chkconfig memcached on

7. installing pecl php extenision for memcached.
wget http://pecl.php.net/...cache-3.0.6.tgz
tar -xzf memcache-3.0.6.tgz
cd memcache-3.0.6
phpize
./configure
make
make install
vi /etc/php.d/memcache.ini
write there (extension=/usr/lib64/php/modules/memcache.so)
check it working with command (php -i | grep mem) you will see output about installed extension.
And restart apache with "/etc/init.d/httpd restart"

8. Go to php code of site.

find file core/class.session.php
there find function set_params()

and there rows like:
ini_set('session.cookie_path', ((!empty($current_path))? $current_path : '/'));
ini_set('session.gc_divisor', 10); // probability is 10% that garbage collector starts

add after it:
ini_set('session.save_handler','memcache');
ini_set('session.save_path','127.0.0.1:11211');

after it sfind function init()

there comment Session::set_handlers(); must look like

Session::set_params();
//Session::set_handlers();
Session::start();



#110087 Sales Report Taking Forever & Needs Reseting

Posted by Offline on 14 April 2011 - 09:09 PM

If you have run a cs-cart site for awhile you will eventually set the dates really far apart on a sales report and your server will slow to a crawl and the report will take forever! Unfortunately cs-cart remembers this setting forever so even if you close the web browser and come back then it starts all over AUTOMATICALLY! So I asked technical support how to reset this. Here is there answer....

UPDATE `cscart_sales_reports` SET `period` = 'D';

Worked like a champ and I had to post this one so I would never loose it.

Thanks!

Chris