Jump to content

My website is very slow at a certain time


npsari

Recommended Posts

my website is very slow 50% of the day

 

I now realized that when i connect to the mySQL database in my scripts, i do not close the connection at the end

 

Do i have to close the connections in everypage

 

Does that play a role in slowing down my site

 

Should i open each page i have and close the connection

 

Please let me know

Link to comment
Share on other sites

But my server hosting company said that my server is fast

 

Here are the details

 

Do you think this server is fast

 

 

Processor #1 Vendor: GenuineIntel

Processor #1 Name: Intel® Pentium® 4 CPU 2.00GHz

Processor #1 speed: 1992.756 MHz

Processor #1 cache size: 512 KB

 

 

Memory: 1034400k/1048512k available (2169k kernel code, 13236k reserved, 725k data, 172k init, 131008k highmem)

 

 

 

Link to comment
Share on other sites

PHP automatically closes your MySQL connections for you unless you have specifically requested persistent connections, so it's not that.

 

Have you checked if it's 'slow' bandwidth, or 'slow' server performance ( ie, SQL query or page generation performance )?

 

Link to comment
Share on other sites

Yes, i think i will have to move to a different company

 

But that is strange

 

i am checking out which is using up the bandwidth, and it shows mainly the 3 images linked from my site

 

So, i only have 3 images (which people are displaying on their sites), and it is slowing down my server

 

What if one day i wanted to add 5 images

 

Then, it is going to shut the server down completely :)

Link to comment
Share on other sites

I'd certainly disable image hotlinking, that might not be helping you.

 

Shared hosting always has the potential to be inherently slow.  You have no idea how many sites are hosted on the same server as yours, or how many people are accessing any of the sites, or how much bandwidth they require.  I would certainly quiz your host on the bandwidth usage on that particular server as a whole, not just your account.  If you don't get an acceptable result, switch hosts.

Link to comment
Share on other sites

Unmanaged Dedicated Server and ure having speed problems? I got 10 mysql-enabled sites in my shared host, adding hundreds (probably exagerating here) of other's accounts and ive never faced a problem. At a good hosting company, for a dedicated server of your parameters, u could pay as much as $100 monthly. So if ure paying $10-$20 or whatever for it, switch company immediately. There are companies out there who provide really cheap hosting (being dedicated too) with a 10 Mbps link for several accounts. Thats for sure that u'll have problems.

Link to comment
Share on other sites

Yes, you images probably are taking up more bandwidth then the rest of the files, but what is the total bandwidth compared to your maximum bandwidth capabilites?

 

Have you confirmend that it's a bandwidth issue or a CPU issue?

 

If it is hotlinking, those must be VERY popular images to be able to have three images slowing down your server.

 

Doesn't your hosting company provide some type of 'cpanel' type interface that allows you to see server stats like processer load, percent bandwith usage?

 

 

Link to comment
Share on other sites

Do you think they are actually lying to me!!!

 

Possibly, yeah!  Well OK, not lying.  Is it a virtual server, though?  If the price is cheap, chances are it is.  That's where software runs on one box to split it into two (or sometimes more) servers.

 

The other factor, as already mentioned, is how fast their pipe is.  You might want to check.

 

How big are these pictures, and how many hits do they get per day?  First thing to do is block hotlinking.  If that doesn't improve things, tell your hosting company that you get poor performance at a particular time of day.  Ask them why this is, and what they can do to rectify the situation.

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.