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
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 =/

Link to comment
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 =/

 

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.