Forums / General Questions / timeout problem with lots of products and a coupon during checkout

timeout problem with lots of products and a coupon during checkout

Locked

Started by mydanilo on 16 Oct 2007, 7:33 PM · Views: 2,264

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
16 Oct 2007, 7:33 PM
#1
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

timeout problem with lots of products and a coupon during checkout

A customer experiences the following error at step 2 of 3 at check out. He put a lot of items in the cart and wants to redeem a coupon as well.

Fatal error: Maximum execution time of 30 seconds exceeded in /home/xxxxx/public_html/xxxxx/xxxxxx/includes/classes/db/mysql/query_factory.php on line 192

He gave me his pwd and I tried it myself. Same thing. I got once to step 3 but then when I scroll down the page no confirm order button is to be found.

Now I tried it again without the discount coupon. Now it worked. Why?

Live and learn... the Zen way.

19 Oct 2007, 12:14 AM
#2
0101101011 avatar

0101101011

New Zenner

Join Date:
Nov 2006
Posts:
61
Plugin Contributions:
0

Re: timeout problem with lots of products and a coupon during checkout

Hi - same thing: works fine without entering ANY coupon (I've tried with variation of coupons), but it was stalling with coupon.

I have asked the Host Provider to increase the timeout in php.ini from 30 sec to 60 or 90 - and it seemed to help.

Can someone explain why this is actually happen? Is there some bug in coupons that could be fixed?

Thanks,

Best,

0100000101011010

---------------------------------
It's not magic, it's just math!

20 Oct 2007, 1:34 PM
#3
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: timeout problem with lots of products and a coupon during checkout

Thank you for sharing your problem. I guess the time out is the problem. Maybe the code is complex for calculating the whole discount coupon thing? Time consuming? OR there is actually a bug that makes the system hang for too long...and we just notice it with lots of products in the cart.

Just guess work on my side....would like to have somebody more knowledgeable give some hints on what it is and could be done.

Live and learn... the Zen way.

21 Oct 2007, 12:24 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: timeout problem with lots of products and a coupon during checkout

What version of Zen Cart?
Has this been upgraded from prior versions? which versions?
What addons/contributions are installed?
What version of PHP?
What version of MySQL?
When you say "lots of products in the cart", how many do you mean?
How many products does it take to trigger this problem for you?
Do these products have attributes tied to them? How many with attributes? How many attributes per product?
Are there any sales/specials active on these products?
Are there any quantity discounts on these products?
What kind of coupon are you using? ie: discounted percentage? discounted amount? free shipping? etc?
Is there a currency exchange happening - ie: shopping in other than default currency?
Does it make any difference which shipping module is selected?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Oct 2007, 11:57 PM
#5
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: timeout problem with lots of products and a coupon during checkout

To your questions:

What version of Zen Cart? -- 1.3.7
Has this been upgraded from prior versions? which versions? -- 1.3.6
What addons/contributions are installed?

column layout grid
cross sell/upsell
EP
Fckeditor
IH2
godaddy sidebox

What version of PHP? -- PHP Version: 4.4.7 (Zend: 1.3.0)
What version of MySQL? -- Database: MySQL 4.1.22-standard
When you say "lots of products in the cart", how many do you mean? --40 prod
How many products does it take to trigger this problem for you? --about 40, need to test more if more accurate is needed.
Do these products have attributes tied to them? How many with attributes? How many attributes per product? -- No attributes
Are there any sales/specials active on these products? about 5 had sales promo
Are there any quantity discounts on these products? NO
What kind of coupon are you using? ie: discounted percentage? discounted amount? free shipping? etc? -- Discount 10% one time use per customer
Is there a currency exchange happening - ie: shopping in other than default currency? -- NO, USD only
Does it make any difference which shipping module is selected? --don't know...I use UPS only.

I hope this gets us a bit closer. Let me know if you need to know more. Thanks for the help.:wink:

Live and learn... the Zen way.

23 Oct 2007, 6:01 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: timeout problem with lots of products and a coupon during checkout

Do your coupons have any restrictions connected to them?
How many products in your store?
How many categories+subcategories?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Oct 2007, 12:39 PM
#7
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: timeout problem with lots of products and a coupon during checkout

No restrictions, but use per customer 1.

90 products, 4 top categories, 20 categories all together top and sub.

Live and learn... the Zen way.

24 Oct 2007, 12:45 PM
#8
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: timeout problem with lots of products and a coupon during checkout

BTW, I just tried a large order with the same coupon again this morning. Worked with some delay at step 3. Page loads partially, you see the products listed and it seems to wait for the calculated bottom, sub total, shipping, discount etc. BUT it loaded and worked. No error today. My guess is, that this is a time out problem.

When the server load is a bit higher around noon, I will try again.

Does the coupon calculation put such a strain on the servers?

Live and learn... the Zen way.

24 Oct 2007, 2:34 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: timeout problem with lots of products and a coupon during checkout

mydanilo:

Does the coupon calculation put such a strain on the servers?

If there were restrictions on the coupon, I would expect a bit more processing effort to calculate eligibility.

Puzzling ... I can't reproduce the problem. Hmmm

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Oct 2007, 11:03 PM
#10
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: timeout problem with lots of products and a coupon during checkout

Must say, it worked both times today. I notice a delay for step 3 loading, probably the calculation of the coupon. It did time out several times for my customer about 1 week ago and I saw it too when I tried it.

I will try and do it one more time about 11am when the spiders hit my site...

Live and learn... the Zen way.

27 Nov 2007, 9:59 PM
#11
cropinstop avatar

cropinstop

New Zenner

Join Date:
Oct 2006
Location:
Surprise Arizona
Posts:
73
Plugin Contributions:
0

Re: timeout problem with lots of products and a coupon during checkout

Same problem, customer ordered about 10 items, with registration coupon at checkout.

Executing:

  218.x.x.x - - [27/Nov/2007:03:07:23 -0800] "POST /index.php?main_page=checkout_confirmation HTTP/1.1" 200 202 "http://www.cropinstop.com/index.php?main_page=checkout&action=null" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)"

Error reported:

  [27-Nov-2007 03:07:23] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /home/cactus2/public_html/cropinstop/includes/classes/db/mysql/query_factory.php on line 405

Zencart 1.3.7, "One page checkout" install same day. A coincidence, or just the same problem?

Is there a fix out for this?:(
How do I increase the query timeout, or set to ignore?

27 Nov 2007, 10:12 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: timeout problem with lots of products and a coupon during checkout

How many Products and Categories?

How do you have the Discount Coupon setup?

During your testing, did you have problems with this coupon?

What version of Zen Cart?

Where did you get it from?

Clean install or an Upgrade?

How did you Install? How did you Upgrade?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

30 Nov 2007, 4:54 AM
#13
cropinstop avatar

cropinstop

New Zenner

Join Date:
Oct 2006
Location:
Surprise Arizona
Posts:
73
Plugin Contributions:
0

Re: timeout problem with lots of products and a coupon during checkout

How many Products and Categories? 12 products in 3 categories. Customer attempted to checkout using Paypal Express and Mastercard. Checkout was successful by not using coupon at checkout.
How do you have the Discount Coupon setup? Setup as reg10 coupon in Zencart. See attached screenshots
During your testing, did you have problems with this coupon? No

What version of Zen Cart? 1.3.7.1, One page Checkout, Lavender template

Where did you get it from? Sourceforge
Clean install or an Upgrade? Upgrade

How did you Install? Fantastico on Lunarpages
How did you Upgrade? Unzipped to local directory, copy/edit to web using "Beyond Compare 2"