SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1 , 2
Topic Duplicates, wrong count down amount in stock and empty orders during Stress Test 174296 Views

Duplicates, wrong count down amount in stock and empty orders during Stress Test

10 April 2014 at 12:26pm Last edited: 10 April 2014 12:49pm

Hello,

this morning, we had a first stress test for our live SilverCart shop and 3 different issues.

First: Four orders were established within the same second, resulting in a doubled order number and a quadrupled invoice number:

Is our suggestion right that the client reads the last number and writes the next without an existing server side increment?

Second: The stock amount did not count down correctly. When it should be 30 pieces, we had still 36 left. There was no correlation with a certain mode of shipment or payment.

EDIT Third: During this time we had two Orders without a single positon, just shipment remained. We did test this before going live and never thought it would be possible:

Re: Duplicates, wrong count down amount in stock and empty orders during Stress Test

10 April 2014 at 4:26pm

Hi Frank,

that's very interesting. Can you provide more details about your test setup?

To investigate on the issues, can you send us a dump of

SilvercartOrder,
SilvercartOrderPositions,
SilvercartShoppingCart,
SilvercartShoppingCartPositions

with corresponding MemberIDs so that we can link the entries.

If you can anonymize the whole DB you can also send us the whole dump. I assume that 2nd and 3rd issue are results of issue 1 - granting that you have activated stock management.

Cheers
Ramon

Re: Duplicates, wrong count down amount in stock and empty orders during Stress Test

11 April 2014 at 5:10pm

Hello Ramon,

I've sent you an anonymized dump of the complete DB to your address in your company so you can test excessively.

Greetings

Re: Duplicates, wrong count down amount in stock and empty orders during Stress Test

11 April 2014 at 5:31pm

Hi Ramon,

Frank and I are working together on this shop.

The situation Frank described wasn't a test, but it was a live situation. We lanched the shop on thursday, selling one product (a coupon worth 50 EUR for 25 EUR).

The sale started 8:00 am and there was a great rush to this time, because there was some advertising for this and the available amount of coupons is limited.

This rush resulted in many orders within seconds.

Next thursday will be a new coupon sale and I fear that it comes back to this situation.

It would be great to have a solution for this.

Thanks,
Manuel

Re: Duplicates, wrong count down amount in stock and empty orders during Stress Test

14 April 2014 at 8:58pm

Hi Manuel,

this is a very short week and we are on tight schedules for some projects we are working on, but we'll try to find a solution.

Cheers
Ramon

Re: Duplicates, wrong count down amount in stock and empty orders during Stress Test

15 April 2014 at 3:24pm

Hi Manuel,

Sebastian will provide a patch to ensure unique reference numbers.

I think I found the shop - if it's really productive already you should change the mode to "live" - in dev-mode there is really a huge overhead in re-created files that are not cached.

Cheers
Ramon

Re: Duplicates, wrong count down amount in stock and empty orders during Stress Test

15 April 2014 at 10:05pm

Hi Ramon,

thanks for investigating on this. :-)

I also changed to live mode now, thank you for the hint.

Best regards,
Manuel

Re: Duplicates, wrong count down amount in stock and empty orders during Stress Test

22 April 2014 at 10:07pm

Hi Ramon,

we received your patch and integrated it.
The numbers are fine now, even with several orders at the same time.

But there is still an issue with decreasing the stock amount with stock management enabled. I think the problem is the same as with the reference numbers.

Is there a chance to get a fix for that?

PS: You are doing a great support job here! Keep on :-)