Jump to content

[SOLVED] PHP running way to slow T_T


Azu

Recommended Posts

About an hour ago my pages were taking around 0.01 seconds to load. Now those same pages are taking like 5.00 seconds to load. CPU usage is 1%

 

Why are they going so slow all of a sudden? Even pages that I have not edited at all whatsoever in any way are suddenly slow as poop when they used to be loading instantly an hour ago!

 

Please help!

 

:(

 

And no its not everything

Images and stuff are fine

It is just PHP

 

And there is noone browsing the site except me so I have no idea what is causing this =(

Link to comment
https://forums.phpfreaks.com/topic/42798-solved-php-running-way-to-slow-t_t/
Share on other sites

I've tracked down the exact part of the code that is taking so long

It's taking ~4.3 seconds to generate and everything else put to together is taking around ~0.01 seconds

 

$db1=mysql_pconnect(localhost,"root","root")or die("Error - can't connect to databaseb1q");
$db2=mysql_pconnect(localhost,"root3","root")or die("Error - can't connect to databaseb5");
$db3=mysql_pconnect(localhost,"root2","root")or die("Error - can't connect to databaseb4");
$db4=mysql_pconnect(localhost,"root1","root")or die("Error - can't connect to databaseb3");

 

Any ideas why this code is taking so long to run when it used to run so fast? I tried optimizing all the databases and defragmenting but that made no differance =/

I've tracked down the exact part of the code that is taking so long

It's taking ~4.3 seconds to generate and everything else put to together is taking around ~0.01 seconds

 

$db1=mysql_pconnect(localhost,"root","root")or die("Error - can't connect to databaseb1q");
$db2=mysql_pconnect(localhost,"root3","root")or die("Error - can't connect to databaseb5");
$db3=mysql_pconnect(localhost,"root2","root")or die("Error - can't connect to databaseb4");
$db4=mysql_pconnect(localhost,"root1","root")or die("Error - can't connect to databaseb3");

 

Any ideas why this code is taking so long to run when it used to run so fast? I tried optimizing all the databases and defragmenting but that made no differance =/

 

if its taking ages to connect to a database, then maybe there is a problem with MYSQL and not PHP?

It has been months since I have changed anything in MYSQL though..  =S

 

Why would it be doing this now all of a sudden?

 

I have been making a bunch of updates in my PHP though so I'm pretty sure it is PHP problem o_O just not sure how to fix it x_x

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.