Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

My store runs so slow!


Recommended Posts

Hi Guys,

 

I need some help. I will give you the stats of our site, server, etc. If you need more, let me know. BUT, our store is running so insanely slow that I KNOW we are losing customers. My host even told us that we are supposedly on a beefier database but we know the database is shared among other clients of theirs.

 

Now, our store is really only about 10% of our yearly income and always has been no matter what type of store we have ever used. BUT, even that is diminished and I know it has to have something to do with the speed. We either time out or wait forever for it to load.

 

Our oscommerce version is 2.2-MS2

Server uses OS Linux 2.6.31.6

HTTP Server is Apache

PHP version is 5.2.12

MySQL version is 5.0.51a-log

 

If anyone can offer some insight, that would be great. If not I would probably be forced to change store software which I do not want to do.

 

Thanks,

Kelly

Link to comment
Share on other sites

The final release of osC 2 (2.2 RC2a) has been out for over two years. You should be thinking about upgrading to that level, although you may want to find out why you're so slow with MS2 before going through the trouble. I can't think of anything in RC2a that should result in a big speedup, that would be likely to fix your performance problem. Can you give an idea of the size and activity on your store -- number of items, number of visitors per hour?

 

You're at PHP 5.2, so soon (PHP 5.3) you are going to have to fix numerous problems with "deprecated" PHP functions. These are functions that will be removed in PHP 6.0, so as of PHP 5.3 they're putting out annoying and disruptive warnings. You're also at MySQL 5, and I'd be surprised if you weren't getting warnings about certain fields not being found. Do you have warning and error messages shut off? Anyway, there are a number of fixes that need to be made when going from MySQL 4 to 5. Unfortunately, neither of these version 5 problems are fixed in RC2a, and need to be manually fixed by the site owner.

 

First thing is to check that you don't have added code or configuration settings to shut off warnings and errors, which might be slowing down your site. Although, if the store seems to be working properly otherwise, it's unlikely that you're getting errors. Find and check all logs. Do you have any add-ons, references to external sites (code to be loaded), old code customizations, etc., or are you running vanilla MS2? I think you're going to have to ask your host to work with you to profile your site and see what's slowing you down. Be sure to check for hacks (inserted code) that are sucking up CPU emailing spam, attacking other sites, and whatnot.

 

Finally, it's simply possible that your host is severely underpowered (and/or oversold -- too many users crammed into one box). Very few people report performance problems as severe as yours, so if you can rule out the items discussed above, it may simply be time to move to a more capable provider. Since you're on a shared server, you should be able to find other sites on that server and ask their owners if they too have performance problems. If they do, changing store software isn't going to help all that much, if at all.

Link to comment
Share on other sites

You would probably be best to take on a freelancer for a day to optimise and debug your queries, as this needs sorting out sooner rather than later in order to stop hurting your business. Start with tax query and also_purchased query.

Link to comment
Share on other sites

Thank you so much for the replies. I have a question regarding logging; here are the settings:

 

Store Page Parse time is set to False

the Log Destination is set to a file area I cannot find, /var/log/www/tep/page_parse_time.log

date format is set - no big deal there

Display Page Parse time is set to True

Store Database Queries is set to False

 

So, based on that, it looks to me that I don't store the logs. I can tell you I have never received an error.

 

I am happy to work with the info given and will try the Output querries debug if that would help me locate the reason for the problem but it does seem to keep coming back to the server.

 

We have faster times but definitely slower during the day. I don't know how to find out who else is running on their database that we share.

 

The biggest issue that I have is this, if it is the server and there is nothing they can do - how do you go about choosing the best server. What should I look for and ask for?

 

Thank you again,

Kelly

Link to comment
Share on other sites

A lot of folks blame performance on poorly written queries or something else and overlook the simple things. Look in your images directory and consider the average size of the images stored there. If they are large (over 100k) and you are NOT using a thumbnailer then that may be half your problem.

 

Another thing that is often overlooked is that a lot of stores nowadays are being run on user quality lines instead of server quality lines. By that I mean, that companies often use a simple DSL line for a server thinking that it will work just fine. After all, the workstations are browsing the internet at lightening fast speeds. The reality is, a lot of ISPs provide a DSL line with 1.5+ download speeds but only 128k upload speeds. 'Home' servers are especially prone to this. Consider that.

 

Finally, consider all the previous posts. Each is a valid contributing factor.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

  • 3 weeks later...

We have looked through a lot of settings on our store. I can tell you we have 230 items in the store. Most of the image sizes are below 350k, I know some would say they should be smaller than that but like I said, when you sell art - you need to be able to see it. Also, if the problem was all about image size, I would think our store would be slow always but it isn't. Many times we can check it and pages load within 3 - 6 seconds but then an hour later - we are back to 2 minutes minimum or not loading at all.

 

However, I have been checking the administration when we seem to get server issues, last night at midnight EST, either the store pages took over 4 minutes to load or we received server errors that the server was not responding, server was reset, etc. At that time we had 31 visitors online and many of those logs were the same IPs, so in reality there were only 4 unique users.

 

We have put in tickets to our server and the only answer we get is that they are investigating - that sometimes other clients use more space than they should and they need to investigate and fix that...in other words a lot of BS.

 

Also, we have no errors as MrPhil suggested to check for. I have not added the Output Query debug yet, not really sure if that would show much of anything. I think it really seems to be the shared server due to the irregularity of response times.

 

Thanks for any input.

Link to comment
Share on other sites

We have looked through a lot of settings on our store. I can tell you we have 230 items in the store. Most of the image sizes are below 350k, I know some would say they should be smaller than that but like I said, when you sell art - you need to be able to see it. Also, if the problem was all about image size, I would think our store would be slow always but it isn't. Many times we can check it and pages load within 3 - 6 seconds but then an hour later - we are back to 2 minutes minimum or not loading at all.

Let's say you have 12 items shown on a page. For that page to load it has to run the code and output the html, and render approximately 4 megabytes of images. Without a thumbnailer you will take a performance hit.

 

However, I have been checking the administration when we seem to get server issues, last night at midnight EST, either the store pages took over 4 minutes to load or we received server errors that the server was not responding, server was reset, etc. At that time we had 31 visitors online and many of those logs were the same IPs, so in reality there were only 4 unique users.

If you want worse case scenario then by all means use midnight as a barometer. There must be a ton of cron jobs running at midnight on most linux boxes. I'd look at something closer to 5am Eastern or 11pm Pacific time as a barometer. (er, not prime time where your server is, that is...)

 

We have put in tickets to our server and the only answer we get is that they are investigating - that sometimes other clients use more space than they should and they need to investigate and fix that...in other words a lot of BS.

 

Also, we have no errors as MrPhil suggested to check for. I have not added the Output Query debug yet, not really sure if that would show much of anything. I think it really seems to be the shared server due to the irregularity of response times.

It will show if the bottleneck is the queries or the html rendering. You should also consider whether the bottleneck might be in line speed either at your server or at your client.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Let's say you have 12 items shown on a page. For that page to load it has to run the code and output the html, and render approximately 4 megabytes of images. Without a thumbnailer you will take a performance hit.

 

We actually set our site to only 5 items per page - So here is where my basic knowledge is limited - what do you mean thumbnailer? Is that different than what osCommerce does automatically by making the item smaller? Or is this an add on that I do not have? I can tell you when things are slow even pulling up one particular item to see the details of just that product takes too long to load too.

 

 

If you want worse case scenario then by all means use midnight as a barometer. There must be a ton of cron jobs running at midnight on most linux boxes. I'd look at something closer to 5am Eastern or 11pm Pacific time as a barometer. (er, not prime time where your server is, that is...)

 

Okay, that makes sense but we do check it many times during the day. 3:30pm is good but 5:00pm sometimes is bad, 8:30pm can be real bad but it varies day to day. But I will make sure to not mention the midnight time frame to the server. Thanks for that heads up.

 

 

It will show if the bottleneck is the queries or the html rendering. You should also consider whether the bottleneck might be in line speed either at your server or at your client.

 

Okay, I will get onto adding this. At this time it seems that so many websites use MySQL and PHP for more than just shopping carts. Maybe it is time to try a different cart approach if there is one? Oh, also we are cable internet as fast as can be. We have checked with other people who have cable, DSL and satellite and the slow times seem to be consistent (obviously anyone who has a slower service will still have problems regardless) It just seemed that when we first started with this host about 3+ years ago - they were even confused about PHP and MySQL and were newbies at it but our run speed was great, now I really think many hosts over sell their shared servers which stinks because dedicated servers are really expensive.

Link to comment
Share on other sites

It might have something to do with the two or three porn sites taking up all the bandwidth and sql cycles. there is only 15 or so web sites on that IP address as far as i can see, but the porn sites seem to run quite fast!

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

It might have something to do with the two or three porn sites taking up all the bandwidth and sql cycles. there is only 15 or so web sites on that IP address as far as i can see, but the porn sites seem to run quite fast!

 

 

What on earth are you talking about? What porn sites and what IP are you looking at. Are you talking about our server? I never mentioned any IP address at all. We do not run port sites - can you please explain what you are talking about? If it is our server that is using the same database for porn sites then we will definitely switch hosts. How did you find this out when I have not been able to?

Link to comment
Share on other sites

What on earth are you talking about? What porn sites and what IP are you looking at. Are you talking about our server? I never mentioned any IP address at all. We do not run port sites - can you please explain what you are talking about? If it is our server that is using the same database for porn sites then we will definitely switch hosts. How did you find this out when I have not been able to?

Oops, my mistake and apologies. This was meant for another thread. But, do a search for your IP address to see how many other websites are on the same server, and of what types. Contributing factor?

 

Sorry

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Oops, my mistake and apologies. This was meant for another thread. But, do a search for your IP address to see how many other websites are on the same server, and of what types. Contributing factor?

 

Sorry

 

Okay, wow you got my attention there. I think I have found a BIG error on my store site. It would appear the cache directory that I created some time ago is actually not working. It says the cache directory does not exist I have home/mywebsite/public_html/my_cache/ but I think I really messed up because there are no files in that directory - permissions are set at 755.

 

Is there a tutorial for how to set up a cache directory?

 

I need to go to oscommerce php school!!! ahhhhhh....

Link to comment
Share on other sites

Okay, fixed the cache control - anyone else needs that info I found the answer here:

 

http://www.oscommerce.com/forums/topic/70820-admin-tools-cache-control/

 

What I did wrong was that I did not correctly use the file location name. If you look up your data backup in the admin area of oscommerce, you see what the file name is there and that is what you have to use. That forum area explains it better than I do. I am actually going to restart my computer, clear out my modem and see if caching actually makes any difference at all.

 

I still need info or tutorial on thumbnailing?! Thanks.

Link to comment
Share on other sites

osCommerce does not resize images for you. The stock code just sends the full-size image to the customer's browser and tells the browser to resize it. This is extremely inefficient in most cases, and often results in poor-quality images.

 

There are several addons that allow you to set different images for the product listing, the products page, and the popup. Some of these include automatic thumbnailers that will resize the images for you. If you are concerned about the appearance of all of your images, or if some need to be sightly different sizes for clarity, I suggest that you resize the images yourself and not rely on an automated tool with a fixed ruleset.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I usually use More Pics Advanced because it has the capability to use multiple images on the Product page. It sounds like you don't need that capability. I don't have any recommendation for just the tree image sizes. If you click Addons up at the top, and then the Images section, you'll find several 3-images Addons and several thumbnailers. Any of those that is currently supported should work. You can ask in the forum support thread for each one if you have specific requirements.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I want to thank you all for the insight and info.

 

I have fixed the cache control and am currently looking into thumbnails. But, I thought I would share this "insightful" response to our ticket at our current host. At the time this response came in, our store takes at least 20 seconds or more to load a page, after clicking about 4 different store pages you finally get a "Server not Responding" error. Here is the ever so NOT helpful reply:

 

Thank you for contacting Support.

 

The site is currently loading normally, but please be aware that due to the

shared hosting environment there will be times when large amounts of traffic

on the server cause slower load times. Please let me know if you need

further assistance.

 

The most ironic part is that the ENTIRE site is now down, not just the store. So, we are moving soon. Thanks for all the input. I will continue looking into addons that make the store run better.

 

-Kelly

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...