Cart doesn't update and can't checkout!

@Olivier and I launched our very first test order cycle in Norway with around 15 people, as a real test, and we have some trouble that didn’t appear in our pre-opening tests: the first 4 orders went well, and we received today two emails from people who, after having added some products, want to click on “update cart”, but it turns, turns, but never proceed to the “clickable button” to updat cart page… I just reproduced the error, by adding products two by two, and after around 20 products I had that. I waited for one hour but nothing happened… the orders close on Wednesday 7th and we don’t know what to do! Any idea where it might come from?

@RohanM, @maikel, @Kirsten? @NickWeir that has come up in the UK issues 506 and 627, was it the same problem? We checked the calculator and it’s all fine. I can’t restart the servor myself as I won’t know what to do if something happens and we are in live testing so probably not the best idea… @sigmundpetersen if you feel you can restart the server that might be something to try?
Ping @Olivier and @lin_d_hop
Thanks in advance for your tips/help!

Ok,another indication, I quit the page and came back, and just tried to add 1 item, and the “updating cart” turned for around 20-30 seconds before the button could be clickable. So it seems we can add the products one by one and wait 30 seconds between each products… which is a lot… It seems the server get completely bugged when we ask to add too many products at the same time…

And when I wanted to empty cart (there were around 23 products in it) it searched for some minute and I got the grumpy cat… So not possible to empty cart either…

@MyriamBoure, could you please check the cpu load on the server, maybe it’s very busy. Then if it’s the case, it could be interested to upgrade it ?

What’s the spec of the server you’re using?

@pmackay here is what is written on DO: 2GB Ram 40GB SSD Disk Amsterdam 3Ubuntu OFN-Norway 19-6-2015 10:16
@gnollet about the CPU there is a pick that goes up to 92%on the user side at around 6pm today…

And on the 7 days CPU:

It seems that the highest pick was yesterday when I reproduced the error before I post that message…
If one of you can help I can send the pass by skype… or tell me what to do and I can do it under your control!
@sigmundpetersen or @Olivier if you think you can doit let me know.

A resize requires a power off. I haven’t done this for OFN before. Are there scripts etc. that need to be restarted after a power on or does everything start up automatically?

If you have 2GB RAM it should be fine. That’s same spec as other servers as I understand (certainly UK ones).

Which version are you running?

@Kirsten v 1.0, Rohan did the upgrade for us while transfering to our DO server. Anyway, we are sending the excel spreadsheet, so would be great to understand where the problem comes from before the next order cycle (in two weeks probably), but no hurry for this one… Thanks anyway if you have an idea.

When trying to make a last order tonight it actually broke the server… We managed to power off and on and it works again, but we definitely can’t launch any more next order cycle without solving that problem… how can we know if it’s linked to the deployment that was made for us? How can we get support on that? We are kind of stuck… this is just preventing us from using the platform and we end up sending excel spreadsheets… :-o

Hi @MyriamBoure,

I’m sorry that you’ve been having problems with the server. I did a quick investigation today to try to understand what has been happening. What I found was that when I added a large number of products to my cart, it made it slower to add more products, and once that time was longer than 30 seconds, the server would time out and I was left with the “Updating cart…” spinner that never finished.

I’ve put in a temporary fix, by increasing the server timeout from 30 seconds to 2 minutes. This will mean that although it will still be slow to add lots (ie. 30+) of products to the cart, at least it should work without stranding people.

I’d like to test this problem on a more recent version of OFN. I think I might have done some work to speed up add to cart (though I’m not 100% sure about that), which might be in v1.1. So an upgrade might fix this problem. Otherwise, doing some work to optimise the add to cart process would likely fix this.

I’ll leave investigation here for the moment. I hope the timeout extension is enough of a fix for now, and we can talk about how support might work and work out a long-term fix when Kirsten and Serenity are back.

Thanks a lot @RohanM for having taken the time to investigate and find a temporary solution for us :slight_smile: We will test and see if that is enough.
Let’s wait for Kirsten and Serenity to go further on how support might work.

Just to make sure: is this an issue specific to the OFN Norway instance or is it common to other instances? What happens if an order is made on OFN Australia with 100 products? Does it wank or just hang like for u?

Ok @RohanM, it seems the quick fix doesn’t work :frowning: It went ok for the first 55 items in the cart, but when I added the next 50 ones it got stuck again on the “updating cart”… and we had users who ordered 100 items so this is a real case. I will write to you and Kirsten to see how we can organize some support, if possible.

@danielle I have re-opened the topic as it’s not solved yet… We are continuing the discussion!

Answer from @sigmundpetersen from the last discussion

Version 1.3 contains a change to the add to cart code that makes it much, much quicker, especially with large carts, along with an upgrade to Ruby 2 which is significantly faster also. It’s not perfect, but it should be much improved.

1 Like

Great to hear @RohanM! Nothing in the world is perfect, nor should it be, so pat yourself on the back :smiley: