News:

Support the VirtueMart project and become a member

Main Menu

Heavy order load.

Started by jimpett81, January 29, 2017, 20:13:48 PM

Previous topic - Next topic

jimpett81

Hi All,

I am in need of advice on our newest web launch.

We have a new clothing brand that sold all stock within minutes and we also oversold on items. We can handle the stock issue as we have more coming in but I want to know what can be done to avoid a repeat.

I think the issue was pending orders not being reserved. They were set to available. If I changed this would it be more stable? We think about 400 orders inside 15 minutes, many inside the same minute.

Can VM and Joomla cope with such a load? The server held up traffic wise. We use PayPal express checkout as a payment method. I am open to any suggestions that will make our next launch day less complicated.

Thanks so much,

James




Joomla! 3.6.3   VirtueMart 3.0.1

Milbo

#1
It is very important that you update and best to the really last version vm3.0.19.3 (going to upload it within the next hour), because the name of the next news is "Cached and Optimised". So there is a better performance, also for the cart.

"I think the issue was pending orders not being reserved. They were set to available."

Tricky. You can prevent better the oversold, but on the other hand, it may reserve too harsh, and you need to set the pending to cancel or so, to free the articles.

Edit: Try this one on a mirror http://dev.virtuemart.net/attachments/download/1051/com_virtuemart.3.0.19.3_extract_first.zip
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Quote from: jimpett81 on January 29, 2017, 20:13:48 PM
We think about 400 orders inside 15 minutes, many inside the same minute.

Nice! Remember, do any update first on a mirror. But latest joomla and vm3.0.18.6 is mandatory!
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jimpett81

Thanks a lot for the help once again. I will update and start looking for a way to manage the stock. Maybe some extensions could help?

Thanks,

James

Milbo

No, an extension would make it worse. The main reason is paypal. But it is not a general paypal problem, it just happens. It can happen also with other payment providers.
In general it works so

Adding a product to the cart, does not reserve it. Lets say you sell tickets, you dont want that someone "reserves" tickets by just putting them in the cart. So VM reserves the product, when it is confirmed by shopper. It is the correct time by law. You make the offer, the customer agrees to the offer in that moment the individual product should not be offered anylonger.

But the question is now, What or Who sets the order to "confirmed by shopper". In case of paypal it is paypal itself. So my explanation is, that people pressed "pay with paypal" and you had, lets say 5 items left. They payed almost simultan. When they pressed "pay", vm counted 5 items left. But 10 people bought it within a minute. Lets assume paypal works with a queque (it must!). Then it is very likely that it collects jobs for stores and sends them at once. So for example it sent 10 times within a second or so "this order must be set to "confirmed by shopper". Then the stock is reduced, but meanwhile other may entered already paypal to pay the order.

We may can handle that by adding another Order status for internal use (like the Pending). Something like "reserve product", which is executed before vm redirects to the payment. It would also need a clean up tasks, because there is the general problem, that VM has no chance to detect in realtime if someone just leaves the payment without using the "cancel payment" or "go back to store" button. For example when someone just closes the browser.
Or you set Pending to reserve items, same problem here, you must "free" the items somehow. This could be done with an automatic tasks, which is started after render or per ajax. It also questionable if it should be reserverd by just putting it into the cart, but for paypal express it is maybe exactly the right thing.

Actually, you are the first I know, who sold so many stockable items in that short time. As you can see, the solution is there, but will take some time to write. It is not handled by simple line. It is at least a goldmembership http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail .
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jimpett81

Hi,

Thanks for the reply and once again great information!

I have never looked at VM membership as I didn't realise it existed, to be honest. I will definitely be signing up. If the solution can be written do I need to sign up and request it?

Thanks,

James

Milbo

Then you must select a goldmembership and kick me per ticket, yes :-)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/