Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2010, 01:19 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,280
Arianna will become famous soon enough
Default Site Suspended - ways to put less strain on the server..?

My whole website (keep in mind this isn't just an adoptable website, it's a forum too) was just suspended due to 'the large amount of connections to images such as /twig/adoptables/siggy.php?id=1495'. Yeah, that's right - because of the adoptables script and people viewing images.
I was hosted with WebzPro, but now my account is suspended and I'm devastated. I have two questions for you guys - how do you cope with many people viewing the images, and is there a way to make it so this doesn't happen again? I'm thinking of changing hosts because I really can't get what was wrong - I wasn't even near my alloted bandwidth!
Arianna
Reply With Quote
  #2  
Old 02-14-2010, 02:08 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,701
BMR777 is on a distinguished road
Default RE: Site Suspended - ways to put less strain on the server..?

It's not bandwidth that is the issue, it's the processing power required to load the images from the siggy.php file that is the issue.

Try using the following code in siggy.php instead of the current code:

PHP Code:
<?php

// Lightweight siggy.php file for laggy server...

// Include our Includes...

include("inc/functions.php");
include(
"inc/config.php");

// Get the ID of the adoptable image we want to load...

$id $_GET["id"];
$id preg_replace("/[^a-zA-Z0-9s]/"""$id);
$id secure($id);

if(
is_numeric($id)){

// Run a query to make sure that the adoptable does in fact exist...

$num 0;

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE aid='$id'";
$result mysql_query($query);
$num mysql_numrows($result);

    if(
$num 0){

    
// We've got a valid adoptable here, now get the image to use...

    
$image getcurrentimage($id);

    
// Redirect to the image...

    
$location "Location: ".$image;

    
header($location);

    }
    else{

    die(
"The adoptable does not exist or is not valid.");
    
    }



}

?>
It's a special lightweight siggy.php that I use on MyAdopts, which has thousands of requests for signature images. It also doesn't use GD image text, which can eat up processing power very quickly.

Please try this out and let me know if it works better for you. :)
Reply With Quote
  #3  
Old 02-14-2010, 02:11 PM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,280
Arianna will become famous soon enough
Default RE: Site Suspended - ways to put less strain on the server..?

Thank you very much, I will replace this now. (:
Reply With Quote
  #4  
Old 02-14-2010, 03:56 PM
redheadturkey redheadturkey is offline
Senior Member
 
Join Date: Jan 2010
Posts: 136
Gender: Female
Credits: 10,199
redheadturkey is on a distinguished road
Default RE: Site Suspended - ways to put less strain on the server..?

try powerhoster.com if you need a new hosting service, they are very good, and have fantastic plans! ^^
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with overloading server Skaiya Questions and Supports 2 09-10-2014 02:41 AM
500 Internal Server Error Empress_Swanbottom Questions and Supports 13 02-10-2013 12:01 PM
server owners powerchaos Webmasters Area 8 12-22-2012 07:51 AM
Other ways of growing? Rozel Suggestions and Feature Requests 1 07-03-2010 08:41 AM
Internal server Error livingingc Questions and Supports 7 06-17-2009 11:19 AM


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

Currently Active Users: 9775 (0 members and 9775 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636