Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Server Overloading


MrE03

Recommended Posts

seems to be a contact query loop and dont know how to fix the problem and was wondering if someone could help. I receive the message of whats causing it in the database, but im not sure what i need to do to fix it.

 

here it is:

 

# Time: 100126 14:27:57

# User@Host: xx[xx] @ localhost []

# Query_time: 126 Lock_time: 0 Rows_sent: 378 Rows_examined: 25489

use xx;

select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from products p left join specials s on p.products_id = s.products_id, products_to_categories p2c, categories c where p.products_id = p2c.products_id and p2c.categories_id not IN ('','','','','','','','','','') and p.products_status = '1';

# Time: 100126 14:27:29

# User@Host: xx[xx] @ localhost []

# Query_time: 127 Lock_time: 0 Rows_sent: 1079 Rows_examined: 26190

select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from products p left join specials s on p.products_id = s.products_id, products_to_categories p2c, categories c where p.products_id = p2c.products_id and p2c.categories_id not IN ('','','','','','','','','','') and p.products_status = '1';

# Time: 100126 14:27:31

 

theres more but majority of it i believe is the same, can someone help?

Link to comment
Share on other sites

Off the top of my head, I can't tell you how to fix it, but one of the clauses: p2c.categories_id not IN ('','','','','','','','','','') looks mighty suspicious. Why would it list 10 category IDs, each null? Do you have any add-ons that might affect category IDs? I've heard of problems where the category ID list was empty, resulting in an error due to not IN (), but I've never seen this one. Any idea which function is being run at the time, which would tell what file to look in? What version of osC?

Link to comment
Share on other sites

Off the top of my head, I can't tell you how to fix it, but one of the clauses: p2c.categories_id not IN ('','','','','','','','','','') looks mighty suspicious. Why would it list 10 category IDs, each null? Do you have any add-ons that might affect category IDs? I've heard of problems where the category ID list was empty, resulting in an error due to not IN (), but I've never seen this one. Any idea which function is being run at the time, which would tell what file to look in? What version of osC?

 

im not really sure what would really effect the category id's maybe the random products module? running the latest version of osc

Link to comment
Share on other sites

im not really sure what would really effect the category id's maybe the random products module? running the latest version of osc

 

As MrPhil said the IN query is the problem.

 

p2c.categories_id not IN does not exist in a standard osCommerce so you need to search the contributions you have added .. the code preceding the query is evidently supposed to fill ('','','','','','','','','','') generally this is achieved by using implode( ',' so perhaps you could look for that once you find the correct file.

Link to comment
Share on other sites

the other module that would directly have that same name p2c.categories_id is the rss module which majority of the coding is located in admin/categories, theres another guy adding categories but hasnt inserted any products yet through the admin section, maybe this is whats causing some overload when people are browsing the site?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...