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.
17 Posts 5276 Views
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?
Issue solved. php.ini was set to use persistant connections. I just changed mysql_connect to mysql_pconnect and it worked fine.
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
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.
scaphis, yes that is correct.
I was using SilverStripe 2.2.3 - this should also work for Silverstripe 2.3.
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.
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.
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?