Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Slow Silverstripe site?

Go to End

17 Posts   5187 Views


21 January 2009 at 4:18am (Last edited: 21 January 2009 4:19am), Community Member, 31 Posts

Our site is fast when testing locally, but on our dedicated server is it extremely slow. What I can try to debug this?

Other threads suggested using caching but that shouldn't be necessary at this stage.

Does SS use persistent database connections? Is there any easy way to tell if the DB connections are the issue?


21 January 2009 at 4:51am Community Member, 31 Posts

Issue solved. php.ini was set to use persistant connections. I just changed mysql_connect to mysql_pconnect and it worked fine.


18 February 2009 at 7:59am (Last edited: 18 February 2009 8:00am), Community Member, 13 Posts

Thanks for following up with your solution! Really helped me out.

By the way, if anyone is wondering, change it in this file: silverstripe\sapphire\core\model\MySQLDatabase.php


3 March 2009 at 4:04am Community Member, 8 Posts

Could you perhaps name the line of code where it is found? is it on line 35 of MYSQLDatabase.php?

is it this?:

$this->dbConn = mysql_connect($parameters['server'], $parameters['username'],

Change to this?:

$this->dbConn = mysql_pconnect($parameters['server'], $parameters['username'],

My site loads so slow... I don't think silverstripe will work unless I fix the load speed.


3 March 2009 at 4:15am Community Member, 31 Posts

scaphis, yes that is correct.

I was using SilverStripe 2.2.3 - this should also work for Silverstripe 2.3.


3 March 2009 at 9:32am Community Member, 13 Posts

Just so you guys know, this seemed to fix my problem at first, but soon after it slowed down again. Unfortunately it's unacceptably slow, so unless this problem is fixed I won't be using SilverStripe again. That's too bad since it's really a great CMS.


3 March 2009 at 10:19am Community Member, 8 Posts

I added a folder called "silverstripe-cache" to my root directory right next to mysite folder etc.

I did a ?flush=1

looked back at the folder and it was filled with stuff... I am no wizard but I think that it is a cache.

Will this work? I dunno - site loads fast now but I will check back in an hour or so.


3 March 2009 at 10:23am Community Member, 13 Posts

You may have figured out this issue. Please let me know how this works out for you! Were we supposed to create this cache folder? Maybe we missed that part in the instructions and that's causing these slowdowns?

Go to Top