Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Site stops loading all mysql related information


Guest

Recommended Posts

Actually I can see that the sql is being executed. I can watch it via MySQL Administrator. It just never shows up on the webpage.

Link to comment
Share on other sites

Keith,

 

There is an error in your index.php file in the <body> section where it loads the categories. I suggest restoring your last backup before you made the latest changes.

 

 

 

 

 

Chris

Link to comment
Share on other sites

Keith,

 

There is an error in your index.php file in the <body> section where it loads the categories. I suggest restoring your last backup before you made the latest changes.

 

Chris

 

But I made no changes at all. It was working fine and then suddenly not.

 

Time and date stamp reflect June 10 which is when the site has been working up until. It stopped working today at around noon.

Link to comment
Share on other sites

Read the posts by steve_s starting here about getting the site to make a log file.

 

That thread is about errors in the admin but you can do the same thing in the catalog.

 

Once you get the site to make an error you can fix it.

 

Without an error message of some type you don't have a clue.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Read the posts by steve_s starting here about getting the site to make a log file.

 

That thread is about errors in the admin but you can do the same thing in the catalog.

 

Once you get the site to make an error you can fix it.

 

Without an error message of some type you don't have a clue.

:blush:

 

Yup, I have this and past errors were logged. Nothing is logged this time at all.

Link to comment
Share on other sites

The site tries to load for about 30 seconds. That sounds to me like a maximum execution time limit. This shouldn't happen if you haven't made any changes. Ask your host if they have made changes to the Web server or MySQL server. Also check for changes that you didn't make, as in hacker files.

 

Regards

Jim

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

Link to comment
Share on other sites

The site tries to load for about 30 seconds. That sounds to me like a maximum execution time limit. This shouldn't happen if you haven't made any changes. Ask your host if they have made changes to the Web server or MySQL server. Also check for changes that you didn't make, as in hacker files.

 

Regards

Jim

 

I think this just might be it. According to Cpanel Resource usage, just 1 or 2 entry processes is causing extremely high (between 50 and 80%) CPU usage. I can watch the cpu usage jump by just refreshing the main catalogue page. I've put in a support request. Something is not right here.

 

Keith

Link to comment
Share on other sites

Maybe this is a hint.

 

When I SHOW PROCESSLIST on my MySQL server I see the following over and over again. Maybe 30-50 instances at any given time:

 

select count(*) as total from products p, products...

 

They are the only processes running.

 

Keith

Link to comment
Share on other sites

Log into your Admin, then go to Configuration >> My Store and set Show Category Counts to off.

 

Regards

Jim

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

Link to comment
Share on other sites

Log into your Admin, then go to Configuration >> My Store and set Show Category Counts to off.

 

Regards

Jim

 

Thanks Jim!

 

This is exactly what was causing my page not to load. Not sure why though.

 

Keith

Link to comment
Share on other sites

The Category Counts are a major MySQL load. Turning them off always reduces load. Sorry I didn't think of that sooner.

 

Of course this was just a quick fix. You need to look at your logs to find out what was going on with the site. Did you have a spider trying to take pages too fast, or a hacker pounding the database? I've seen both of these slow down a site. Perhaps your host throttled your database connection. There must be some reason this suddenly started happening.

 

Regards

Jim

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

Link to comment
Share on other sites

The Category Counts are a major MySQL load. Turning them off always reduces load. Sorry I didn't think of that sooner.

 

Of course this was just a quick fix. You need to look at your logs to find out what was going on with the site. Did you have a spider trying to take pages too fast, or a hacker pounding the database? I've seen both of these slow down a site. Perhaps your host throttled your database connection. There must be some reason this suddenly started happening.

 

Regards

Jim

 

No problem, and thanks again!

 

I am reviewing the logs to see just what was going on. Google has been taking a lot of my pages recently. But I have a lot more to go over yet.

 

Keith

Link to comment
Share on other sites

Here is the reply when my host looked into the issue:

 

Resource wise, the server was 98% idle before I loaded the page, loading the page caused two PHP processes to use one full 2.93Ghz core and MySQL to spike up to 150% usage which is equivalent of 1 + 1/2 of another proc, at 2.93Ghz each. So loading that page effectively used about 7.5Ghz of CPU power which is quite a bit, and of course it never actually loads which leads me to believe there is a code\misconfiguration issue. We are in no way limiting the usage of the script or its MySQL resources... as you can see it used over 2 1/2 processes trying to do whatever it was doing.

 

Keith

Link to comment
Share on other sites

Presuming that your host is telling the truth, they are not the problem. Unusual loading (all the search engine bots at once?) could be the problem, but that can happen at any time.

 

I would start looking at optimizing. You can cache things that take a lot of resources, like the categories box. Mostly it's a matter of finding the processes that are slow and changing them. That will usually be SQL queries. There is a thread in the form on site optimizing that has a lot of good hints. Add the KISS Error Handler to see what is taking the most time.

 

Regards

Jim

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

Link to comment
Share on other sites

I don't think optimizing will help with this problem. My host put me on a brand new, clean server. Just me. Turning on category counts brings this server to its knees.

 

I even replaced application_top.php with a fresh copy and same results.

 

Not sure where to go here, or what to look at next. There are lots of other oscommerce installations with my host with category counts turned on and this is not happening.

Link to comment
Share on other sites

Is this a stock install of osC? Have you made any changes to the Categories box, or replaced it with an Addon version? Try going back to a stock osC install and see if that works.

 

If your installation is strictly stock, your problem is the number of categories in your store and the complexity of the category tree. You could try to reduce the number of categories to reduce the load. If that isn't possible or desirable, you need to optimize the queries. Turning off category counts will help, as will turning on caching, but those are band-aid fixes. Set up the KISS Error Handler and start looking at which queries are taking the longest time.

 

Regards

Jim

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...