Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Website Moving Slow & Error Messages - v2.2 rc1


3 replies to this topic

#1 Kerrigan

  • Community Member
  • 56 posts
  • Real Name:Kerrigan
  • Gender:Male

Posted 21 December 2011, 05:52

Hello everyone. I've had oscommerce version 2.2 rc1 installed and working well for almost two years now. I've done plenty of add-ons, etc., etc., with no problems (that I couldn't fix pretty easily). Now, all of a sudden, in the last month or so, things have been moving very slow on the store. It takes particularly long when one clicks on the "checkout" button, and past that, all the way to completing the checkout.

Besides that, it is generally slow, but not too bad. I can live with it, for now. I have even had the same error message several times. After clicking on the "checkout" button, the page tries to load for a while and then this error message appears:

2006 - MySQL server has gone away
 
 
select languages_id, name, code, image, directory from languages order by sort_order
 
[TEP STOP]
 
2006 - MySQL server has gone away
 
select count(*) as total from sessions where sesskey = "(session key here)
 
[TEP STOP]

This error message isn't appearing right now, but everything is still moving very slow (especially from clicking on the "checkout" button and beyond). What do you think is causing this? I have talked many times to my host and they have "fixed" this several times, but it has only been a temporary "fix" each time. They have done this 3 times now, and the same error message from above eventually comes back.

Now my host is saying that they can't help me anymore until I upgrade to the newest version of oscommerce. While I am open to upgrading eventually (and I will), I'm not convinced that is the problem in this situation. Here is the information about the server:

HTTP Server: Apache
Database: MySQL 5.1.56
PHP Version: 5.2.17 (Zend: 2.2.0)

A couple more things that might be helpful, in helping me:
1) I recently installed a new SSL certificate (a couple of days ago)
2) The session id's have recently started showing in the url again after not showing for a long time. I installed an add-on a while back to ensure they don't show, although I can't remember the name of it off the top of my head.
3) My host said that they have done some recent updates to their server (right around the time when my problems started)

So...what say you? Thanks for any help you can give!

#2 FIMBLE

  • Community Member
  • 6,567 posts
  • Real Name:Nic
  • Gender:Male

Posted 21 December 2011, 07:06

Hi Kerrigan
This mesage is telling you that the SQL server is either off line or its slow.
A few tings you could try...
Repair and optimise you datase via phpmyadmin, this can be a cause of slow response, I suspect that it might be the sessions table so also try truncating it, in the sql window of phpmyadmin enter this truncate table `sessions` it will clear the table of information (check that no one is buying anything or logged in before you do this)
If you can see the server load for the SQL you might get more information.
You should find the core code is OK however addons might cause lengthy queries resulting in the slow running.
The session showing (it should go after a few clicks) indicates that the configure file is not set correctly, check the cookie settings in it.
Just a few things to try out.
Upgrading is a good idea if you are hardening the security aspect which i encourage you to do, however upgrading to 2.3.1 is not necessary to have a secure site, you can follow the upgrade paths from RC1 to RC2 to 2.3.1; you might find this a pain though. There are also many add ons that will keep your site secure, the main thing you would need to do is to add HTACCESS protection to your admin folder as well as the osC login page. Also renaming your admin is a great idea.

The SSL might not be installed correctly however if no error message is received the it can be assumed it has installed OK.

Hope this helps you
Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#3 Kerrigan

  • Community Member
  • 56 posts
  • Real Name:Kerrigan
  • Gender:Male

Posted 21 December 2011, 16:24

Thanks for your help Nic! I truncated the sessions table of my database. That did seem to speed things up significantly, overall. However, things still move really slow when I hit the "checkout" button. The 2-3 clicks that come after the "checkout" button are much faster now though (selecting shipping and payment methods).

You said that I should repair and optimize my database via phpMyAdmin. How do I do this? I've never done that before and I suppose that could be the problem! When I am in my database in phpMyAdmin, I see tabs that say "Structure", "SQL", "Search", "Query", "Export", "Import" and "Operations". I clicked on the "Operations" tab (since it has a wrench tool as its icon), but I didn't see anything about repairing and optimizing. I also clicked on the rest of the tabs and couldn't find anything. Can you walk me through this?

Making changes to the configure.php files did the trick for the session codes. Thanks! I've added lots of securities measures to my store since opening it. I even went through some hacker issues. So, if that is the only reason to upgrade, I won't do it. I have the extra password protection and I have changed the name of my admin...did both a long time ago. My host installed the SSL, so it seems to be fine and is acting just like it did before I changed SSL providers.

Thanks again for all your help Nic! If you could just help with one more thing...the repairing and optimizing of my database, that would be great!

#4 Kerrigan

  • Community Member
  • 56 posts
  • Real Name:Kerrigan
  • Gender:Male

Posted 21 December 2011, 17:21

Nevermind about the repair/optimize question. I figured that out. Everything is working much faster now! Wow! EXCEPT when I click on the "checkout" button from the shopping cart. It takes around 1 and a half minutes (90 seconds) to finally bring up the shipping options. Anyone know why this might be happening? What could it be?

It seems that the checkout_shipping.php and checkout_payment.php are the two having problems getting pulled up. Could it possibly be a problem with the shipping and payment modules or with those .php files? How would I find out if they were the problem?

I went back to the shopping cart, with the same order and same account that took 90 seconds to process the first time, and clicked on the "checkout" button again. This time it only took about 5-10 seconds. I did this several times with the same result. So, it seems that it is only having problems the first time the button is pressed during the same session.

Edited by Kerrigan, 21 December 2011, 17:27.