Zen Cart Logo
Forums / General Questions / Very Slow Site

Very Slow Site

Locked

Views: 1,565

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
23 Apr 2007, 1:11 PM
#1
larryhyman avatar

larryhyman

New Zenner

Join Date:
Apr 2007
Posts:
48
Plugin Contributions:
0

Very Slow Site

The site is very slow....

http://www.canadascrubs.com/catalog/

after reading much on the forums and the FAQ all that I could find is everybody saying how the web hosting mysql is not set up right...

when I contacted my provider, they told me everything was fine, however, they found the reason for the slowness, and now I would like to know if anybody cpold help me mod the code so everything works fast:

here is a copy of their email regarding the mysql database and server:

Hello,

Thank you for contacting Bell Canada Hosting Technical Support!

The service ticket (#1220839 that was submitted for www.canadascrubs.com) has come back from our Tier-3 Support Team indicating that This is a very interesting statement on behalf of the support agents at ZenCart. Our server is healthy and responds quickly. It also has very little load and few users, unfortunately we cannot give details as to how many users or databases, but the server is hardly being used.

The slowness occurs when there are concurrent attempts to update some key tables. db_cache appears to take the place of a session file in php. As always, we can't control how an application is written but the use of a database for this will always be slower than if one allowed php and the webserver to control the session file itself. Necessarily, if the session table (db_cache in this case) has to be written to, no-one can read from it. With php controlled sessions, everyone has their own session file, so there is no such waiting.

The use of whos_online also consumes resources. It too can lock up as it is constantly being updated, edited and written to. This application will slow down with time, but even though we, as visitors, are not viewing the current on line statistics, as we move around this table has to be updated and we don't get our page until it is.

We hope that this helps.


The ticket is now processed and closed. We are available 24 hours a day, 7 days a week for additional assistance, and invite you to contact us if you have any additional concerns.

Regards,

M.D.
Technical Support Specialist
1-866-303-0332 Option 1
[email protected]

23 Apr 2007, 1:19 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Very Slow Site

It is a standard suggestion to turn off "Who's Online" for speed issues. Likewise the categories menu counts.
You can select file or db caching at setup. Not sure how to change it later.

The dev team is working on dramatic improvements in db use which will be out in the next few releases. See the Roadmap above.

23 Apr 2007, 1:36 PM
#3
larryhyman avatar

larryhyman

New Zenner

Join Date:
Apr 2007
Posts:
48
Plugin Contributions:
0

Re: Very Slow Site

how do i turn off whos online?

also here is my config file:

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/services/webpages/c/a/canadascrubs.com/public/catalog/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'xxxxxxxxxxxx');
define('DB_SERVER_USERNAME', 'xxxxxxxxxx');
define('DB_SERVER_PASSWORD', 'xxxxxxxxxx');
define('DB_DATABASE', 'xxxxxxxxxxxxx');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', ''); // use 'db' for best support, or '' for file-based storage
// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/services/webpages/c/a/canadascrubs.com/public/catalog/cache');

23 Apr 2007, 1:57 PM
#4
larryhyman avatar

larryhyman

New Zenner

Join Date:
Apr 2007
Posts:
48
Plugin Contributions:
0

Re: Very Slow Site

SO....

The slowness occurs when there are concurrent attempts to update some key tables. db_cache appears to take the place of a session file in php. As always, we can't control how an application is written but the use of a database for this will always be slower than if one allowed php and the webserver to control the session file itself. Necessarily, if the session table (db_cache in this case) has to be written to, no-one can read from it. With php controlled sessions, everyone has their own session file, so there is no such waiting.

What would be the best setting?

// For SQL_CACHE_METHOD, you can select from: none, database, or file

and

define('STORE_SESSIONS', ''); // use 'db' for best support, or '' for file-based storage

also, how do i fix the whois issue?

The use of whos_online also consumes resources. It too can lock up as it is constantly being updated, edited and written to. This application will slow down with time, but even though we, as visitors, are not viewing the current on line statistics, as we move around this table has to be updated and we don't get our page until it is

or should I just assume 3 sec a page is going to be the best that I'm going to get?

Thank you for any help !