Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   oh dear. (http://www.mysidiaadoptables.com/forum/showthread.php?t=584)

rosepose 03-29-2009 05:55 PM

oh dear.
 
My site keeps crashing due to CPU overloads. Apparently it's because there a ton of hotlinking and stuff going on, if there any way for me to minimize this?

-Rose

kisazeky 03-29-2009 07:18 PM

RE: oh dear.
 
Easy just put your adoptable images on a separate host like photobucket.

rosepose 03-29-2009 07:36 PM

RE: oh dear.
 
Yes, but that doesn't edit the existing adoptables :3

BMR777 03-29-2009 07:42 PM

RE: oh dear.
 
One thing I recommend you do is DISABLE the featured adoptable. The method that it uses to select the featured adoptable can use some CPU resources if your site has a lot of hosted adoptables.

In functions.php find and delete:

PHP Code:

$conn mysql_connect($dbhost$dbuser$dbpass) or die ('Error connecting to mysql database!');
mysql_select_db($dbname);

$sql_query "SELECT * FROM owned_adoptables ORDER BY RAND() LIMIT 1";
$result mysql_query($sql_query);

if(
mysql_num_rows($result))
{
    while(
$row mysql_fetch_row($result))
    {
    
$id=@mysql_result($result,$i,"uid");
    
$name=@mysql_result($result,$i,"name");
    
$imageurl=@mysql_result($result,$i,"imageurl");
    
$currentlevel=@mysql_result($result,$i,"currentlevel");
    
$totalclicks=@mysql_result($result,$i,"totalclicks");
    
$owner=@mysql_result($result,$i,"owner");

    
$content "<p><img src='".$imageurl."' id='me' alt='Featured Adoptable'>
                    <strong><a href='show.php?id="
.$id."'>".$name."</a></strong><br />
                    Level: "
.$currentlevel."<br />
                    Owner: "
.$owner."<br />
                    <a href='levelup.php?id="
.$id."'>Add more HP</a></p>";


    }
}
else
{
$error "No Adoptables!";
return 
$error;


That should help save some CPU for your site. :)

rosepose 03-29-2009 08:19 PM

RE: oh dear.
 
Thanks, I did that :3 *pokes her server* I sent them a help message asking about it.


All times are GMT -5. The time now is 09:03 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.