• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Aaron
#1 Posted : Wednesday, April 28, 2010 9:02:22 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
So, we've been having some performance problems with one of our BV 5 sites and notice that there were 1.5 million empty carts! Turns out the cart cleanup process has been failing every day for some time. We're accumulating many times more carts per day than we have site visitors (i.e. 25,000/day), so it looks like the carts are coming from some kind of bot, presumably search engines. Has anyone else encountered this problem before?

It looks like BV creates a new cart when a user first visits the site. Search engines seem to create a new session with every page visit, so for every page they hit they could potentially be creating a new cart., right?
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
birdsafe
#2 Posted : Wednesday, April 28, 2010 10:20:19 PM(UTC)
birdsafe

Rank: Member

Joined: 2/21/2007(UTC)
Posts: 1,113

Aaron,

I didn't think a visit created a cart - I've seen visitors come into our site in our Live Help window and a new empty cart was not created. I think they have to go to the cart page to initiate a cart (or add something to the cart), but I'm not sure.
sternyy
#3 Posted : Thursday, April 29, 2010 8:25:36 AM(UTC)
sternyy

Rank: Member

Joined: 1/10/2005(UTC)
Posts: 714

Thanks: 14 times
Was thanked: 1 time(s) in 1 post(s)
Same problem here. The cart cleanup doesnt work on my site either. I have to use a query to cleanup all the old carts.
Aaron
#4 Posted : Thursday, April 29, 2010 8:33:42 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
OK, I think I figured it out. If you're using the TekGearRedux theme, or based your theme on that theme (which I guess we must have), the Header control indirectly creates a cart. Since the Header control is on every page, that essentially means that every new session will create a new cart. Below is the code fix I put in place on our site. I'll have a better idea of whether this fixes the problem after a day, but I'm reasonably confident that it will.

Code:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then

' <DEVELISYS> PERFORMANCE
'Dim quantity As String = SessionManager.CurrentShoppingCart.TotalQuantity.ToString("0")
'Dim subtotal As String = String.Format("{0:c}", SessionManager.CurrentShoppingCart.SubTotal)
' </DEVELISYS>

lnkStoreName.Text = WebAppSettings.SiteName
lnkStoreName.ToolTip = WebAppSettings.SiteName & " Home Page"

lnkHome.Text = Content.SiteTerms.GetTerm("Home")
lnkHome.ToolTip = Content.SiteTerms.GetTerm("Home")

lnkMyAccount.Text = Content.SiteTerms.GetTerm("MyAccount")
lnkMyAccount.ToolTip = Content.SiteTerms.GetTerm("MyAccount")

lnkContactUs.Text = Content.SiteTerms.GetTerm("CustomerService")
lnkContactUs.ToolTip = Content.SiteTerms.GetTerm("CustomerService")

lnkSearch.Text = Content.SiteTerms.GetTerm("Search")
lnkSearch.ToolTip = Content.SiteTerms.GetTerm("Search")

lnkCart.Text = Content.SiteTerms.GetTerm("ViewCart")
'lnkCart.ToolTip = "Your Cart: " & quantity & " - " & subtotal ' <DEVELISYS> PERFORMANCE

End If
End Sub
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
ttillman
#5 Posted : Thursday, April 29, 2010 9:42:50 AM(UTC)
ttillman

Rank: Member

Joined: 4/10/2009(UTC)
Posts: 120
Location: Mechanicsville, VA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Same problem on a store I used to operate. Will check this out. We used the tekgear theme.


Tim
Aaron
#6 Posted : Thursday, April 29, 2010 10:25:49 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Whoops, just realized that when I pasted the code above I forgot to comment out the two lines between the <DEVELISYS> comments. I updated it above.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
ttillman
#7 Posted : Thursday, April 29, 2010 1:54:53 PM(UTC)
ttillman

Rank: Member

Joined: 4/10/2009(UTC)
Posts: 120
Location: Mechanicsville, VA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Aaron, you might want to check one little thing. If you have no cart created upon initial entry to the site, and go immediately to cart.aspx, it will error out.


Tim
Aaron
#8 Posted : Thursday, April 29, 2010 2:45:32 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Tim,

Have you gotten an error from using the code above? I haven't seen any problems. After those code changes this should work just like the other BV themes.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
ttillman
#9 Posted : Friday, April 30, 2010 7:11:50 AM(UTC)
ttillman

Rank: Member

Joined: 4/10/2009(UTC)
Posts: 120
Location: Mechanicsville, VA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
After some review, the error is not being caused by this, sorry. Some other custom code in the cart.aspx is failing. Sorry. I'm a loser.


Tim
Aaron
#10 Posted : Friday, April 30, 2010 8:05:33 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
The code above fixed my problem. The carts are now under control!
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
birdsafe
#11 Posted : Friday, April 30, 2010 10:15:54 PM(UTC)
birdsafe

Rank: Member

Joined: 2/21/2007(UTC)
Posts: 1,113

My theme is based on the Redux theme, but I haven't had that problem - my oldest cart is April 25th as of today -- the cleanup seems to be working for me. Now, I have had a developer work on my Header file, so maybe he cleaned that up when he worked on it.
Aaron
#12 Posted : Sunday, May 2, 2010 2:23:17 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
It also depends on your site traffic and how often the search engines spider your site.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
pread
#13 Posted : Sunday, May 2, 2010 5:17:15 PM(UTC)
pread

Rank: Member

Joined: 10/24/2005(UTC)
Posts: 40

Thanks: 1 times
Aaron.

Although our cart cleanup was working fine, I thought there may be a problem as we too seemed to have a ridiculous number of empty carts. I just assumed it was the nature of BV. I made the change yesterday and the number of empty carts today shrank by over 90%. I wonder how many sites with this problem are sharing our SQL server.


Thanks Aaron, I don't think I would have ever looked there.


Paul
ttillman
#14 Posted : Monday, May 3, 2010 7:57:19 AM(UTC)
ttillman

Rank: Member

Joined: 4/10/2009(UTC)
Posts: 120
Location: Mechanicsville, VA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Made changes to live site. Working like a charm. Google indexed the site last night and there are a minimal number of carts, which seem to correspond closely to actual user visits from yesterday. :)

Excellent Aaron... been dealing with this for years, but just thought it was something that BVC did. Never thought to even look into it as an issue. All this time I had just been manually running scripts to clean out those extra carts.


Tim
MDG_WA
#15 Posted : Wednesday, July 14, 2010 10:36:51 PM(UTC)
MDG_WA

Rank: Member

Joined: 2/25/2010(UTC)
Posts: 1

I have noticed this problem on our site and I would like to post your code fix. Is there somewhere specific I should post this code? Thanks--Mike
Aaron
#16 Posted : Thursday, July 15, 2010 11:04:32 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Mike,

You code posted above is from the code-behind file for the header control (i.e. /BVModules/Themes/[YOUR_THEME]/Controls/Header.ascx.vb
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
JWS
#17 Posted : Saturday, July 17, 2010 9:05:32 AM(UTC)
JWS

Rank: Member

Joined: 5/25/2010(UTC)
Posts: 6

Aaron,

Thanks for the great fix!!

We discovered that the huge number of empty carts was coming from McAfee Secure daily scans of our website, not just web bots.

JWS
TMaiden
#18 Posted : Monday, July 26, 2010 11:46:17 AM(UTC)
TMaiden

Rank: Member

Joined: 6/28/2010(UTC)
Posts: 38

our empty carts are being created every few seconds from midnight to midnight.


we ran the "cart cleanup" and it started, but then the site crashed - maybe due to lack of disk space.
Aaron
#19 Posted : Monday, July 26, 2010 12:06:45 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
You have too many carts for the cart cleanup process to clear out before timing out. You will need to write a SQL script to manually clear these out.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Aaron
#20 Posted : Tuesday, November 29, 2011 2:23:08 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: "Aaron" Go to Quoted Post
You have too many carts for the cart cleanup process to clear out before timing out. You will need to write a SQL script to manually clear these out.


For anyone that may be experiencing this problem (or just degraded performance), try our optimized cart cleanup process that's part of our free Develisys BVC 5 Toolkit (link below).

http://forums.bvcommerce.com/de...lt.aspx?f=91&m=64862
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012