Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-29-2013, 04:42 AM   PM User | #1
dpgardne
New to the CF scene

 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
dpgardne is an unknown quantity at this point
Why is my website so slow at certain times of the day?? HELPPPPPP!!

My website www.ithp.org goes lightning fast during parts of the day and other times it goes so slow it barely loads after an entire 5 minutes. This has no connection to the amount of traffic that is on the site.

By the way it is only the homepage that goes extremely slow. Every other page is very fast. The web dev. doesn't know how to fix it and either do I. If you want to get paid to fix the problem email me at admin@ithp.org

Basically we have a mysql database, godaddy linux hosting, and I believe it uses php. We should not be having these problems and I desperately need your help.
dpgardne is offline   Reply With Quote
Old 01-29-2013, 01:14 PM   PM User | #2
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,503
Thanks: 45
Thanked 439 Times in 428 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
Well there isn't much we can say without knowing more about it such as the php code that runs in the main page that you're having problems with.

Also are you on a shared hosting package or do you hire a dedicated server / vps? - If you're on a shared machine it may not actually be your site at fault. It may well be that the mysql (database) server is being slowed down by another website that is accessing it (eg maybe someone has a badly coded website running multiple queries in a loop or it just gets a lot of visitors which also could weigh down the database server).

Either way, unless you can tell us more, there isn't much we can do to help!
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 01-29-2013, 01:46 PM   PM User | #3
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,639
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
There's also a bit of data on this first page. What kind of queries are you running? Are they truncated to length using PHP or are you using mysql to truncate that? If you pull every story article at full length, that's a lot of data to process. On the other hand, most of these links go external. So how do you get the data used here? Are you checking an online status before showing the articles? If so, you may have a remote site that's down.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Old 01-29-2013, 10:54 PM   PM User | #4
ckirkster
New to the CF scene

 
Join Date: Jan 2013
Location: UK
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
ckirkster is an unknown quantity at this point
I notice that on the homepage you have lots of articles linked from other websites.

My main question is are these scraped from their original pages? If the answer is yes then the next question is are they scraped live (as the page loads) or are they scraped in a background automated process or equivalent?

If it turns out that this is a live scrape then that's likely to be your bottleneck.
ckirkster is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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


All times are GMT +1. The time now is 06:52 PM.


Advertisement
Log in to turn off these ads.