Forums / Basic Configuration / Fatal error: Maximum execution time

Fatal error: Maximum execution time

Locked

Started by yodamo on 27 Nov 2006, 8:18 PM · Views: 6,275

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
27 Nov 2006, 8:18 PM
#1
yodamo avatar

yodamo

New Zenner

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

Fatal error: Maximum execution time

Hello!

OK, so I'm quite the new one to Zen-Cart [never heard of php & mysql until 5 days ago] but I downloaded, installed, and have gone live after a lot of testing...but the one thing I didn't test for was adding a LOT of items to a cart and then trying to check out.

I have both off site CC and PayPal (plus walk in and check by mail) payments allowed.

This error occurs for CC checkout.
The customer's cart has over 50 items in it, some of those items are in singles (QTY =1) or in multiples (QTY > 1)

EVERY time, there is this error:

Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/path/to/my/server/htdocs/catalog/includes/classes/db/mysql/query_factory.php on line 176

How do I fix this? My products are typically bought 20 to 1000 at a time, and always in singles or multiples... these carts are > $200 so you can see it's a bit...um, important? :cry:

Yike!
Many thanks in advance,
-Alyce

27 Nov 2006, 8:21 PM
#2
yodamo avatar

yodamo

New Zenner

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

Re: Fatal error: Maximum execution time

oops! Me again :-)

Forgot to add:

Every time ths happens, mysql (v. 3.23) hangs -- can't access frontend or admin until I ssh in an kill the process, delete the lock, and force a restart on mysqld-safe.

eeeeek...!
Anybody have any experience with this mysql timeout error in checkout with large carts?

TIA,
-Alyce

27 Nov 2006, 9:30 PM
#3
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Fatal error: Maximum execution time

If you are the Server Admin, edit your Server 'php.ini' file to increase the timeout from 30 seconds to 60 or 90. Then restart Apache.

The learning is in the doing.

Potent Products

27 Nov 2006, 10:06 PM
#4
yodamo avatar

yodamo

New Zenner

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

Re: Fatal error: Maximum execution time

Hello!
and thanks :-)

Yes, I have already edited both the php.ini file and the httpd.conf file to allow for increased timeouts, plus I have increased the memory allocated for php to 32MB but...still no joy :no:

I did notice after the php.ini change that the SAME error occurs during checkout. It still states the 30 second timeout error, even though php.ini is set to 60.
on line ```
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/path/to/my/catalog/includes/classes/db/mysql/query_factory.php193


Trying to figure where else the timeout limit of 30 seconds is being applied, but I'm thinking it is buried somewhere within the SSL initialization...?

My reasoning here is because when I run the checkout process WITHOUT the secure server, there is no error. The error only occurs during Checkout Confirmation (customer gets to Step 2, but cannot continue to Step 3 and beyond), which is of course on the secure server (sorry, there is no way I will let my customers go through checkout with CC info on an unsecure server).

The SSL certificate sits on the same server, no change to the URL other than the 's' at the end of http.

yike!  :cry:
-Alyce
27 Nov 2006, 10:14 PM
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Fatal error: Maximum execution time

Depending upon Server setup, it could be you did not edit the correct 'php.ini' file.

locate php.ini

Run the above command from your 'root' shell and see how many versions you have. Also, would you be using WHM/Cpanel and/or Zend? If yes, the 'php.ini' file to edit is within the Zend dir.

The learning is in the doing.

Potent Products

27 Nov 2006, 10:36 PM
#6
yodamo avatar

yodamo

New Zenner

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

Re: Fatal error: Maximum execution time

Hello! and thanks :-)

Yes, I checked to see where/how many php.ini files there might be. There is only one, located in its spot at /etc/php.ini

That was one of the things that I was thinking about, that there might be more than one instance of the php.ini file, but that's not the case. Would have been nice if it could be that simple, eh? :huh:

I'm still stuck on it being an SSL issue, since it only occurs when sending the cart checkout over the secure server.

FYI, here's my configuration (don't laugh!):

Zen Cart 1.3.6
PHP 4.4.4 './configure' '--with-mysql' '--with-apxs=/usr/sbin/apxs'
Linux RedHat 7.3
OpenSSL

Another thing I noticed when checking the php core is that the 'Master' timeout is set to 30, and the 'local' timeout is set to 60, if that makes a difference (I don't know how to reset the 'Master' timeout).

Also, in the php status list, the registered streams are ftp, http, and ftp. https is not listed. Would this be causing a problem?

[I've been googling my fingers off in the meantime :blink:]

TIA,
-Alyce

27 Nov 2006, 11:56 PM
#7
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Fatal error: Maximum execution time

PHP 4.4.4 './configure' '--with-mysql' '--with-apxs=/usr/sbin/apxs'

That is a very slim to none, setup of PHP? Without CURL you will not be able to properly run SSL connections.

The learning is in the doing.

Potent Products

28 Nov 2006, 12:21 AM
#8
yodamo avatar

yodamo

New Zenner

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

Re: Fatal error: Maximum execution time

Hello!

Wow.. OK :lookaroun I will redo the php 4.4.4 installation and see what happens...

I don't have curl set up at all--I didn't do it since I did not want real time CC authorizations (I must do them off site because we often have to do split shipping, and can't charge until the item is actually shipped).

However, if curl is required for ANY ssl connection (which is odd, because the ssl works on small carts--it's just the large carts that are getting the fatal error timeout) then I'm wondering why it's working at all? yike. Or is curl (OK, so I am new to curl too) something else entirely... (adding it to the list for homework).

In the meantime, some other things I found on the php.net site:

a bug in php 4.4.4 where https is not streamed in the core... but there isn't a fix for it that I can find....? Something about OpenSSL as a native to php 4.4.4 but it isn't working properly--it is not streaming (which is what I found out when I looked at my php status--there is http, but no https)

As I said I am very much a newb when it comes to php!

I will find out what I can from the php.net site, but right now there isn't anything there about how to add https streaming to the php 4.4.4 core if the native ability isn't working. Any clue on how to do this???

Here is the URL for the installation that isn't working right if you care to have a look?
http://www.yodamo.com/catalog

Please be gentle :wink2: as it is a production installation at the moment (FYI I usually have between 5 to 20 customers visiting at a time, and averaging around 3 to 5 active carts at a time).

TIA,
-Alyce

28 Nov 2006, 12:29 AM
#9
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Fatal error: Maximum execution time

Not sure about any errors/problems with PHP 4.4.4 & CURL. I use it without any.

PHP Version 4.4.4
Registered PHP Streams php, http, ftp, https, ftps, compress.zlib
CURL support enabled
CURL Information libcurl/7.15.3 OpenSSL/0.9.7a zlib/1.2.1.2

The learning is in the doing.

Potent Products

28 Nov 2006, 12:46 AM
#10
yodamo avatar

yodamo

New Zenner

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

Re: Fatal error: Maximum execution time

Rob...

How did you get the https streamed into php 4.4.4...? Are you using OpenSSL?

TIA,
-Alyce

28 Nov 2006, 1:34 AM
#11
yodamo avatar

yodamo

New Zenner

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

Re: Fatal error: Maximum execution time

Ha! I must be really tired... could focus enough on your reply to actually see your libcurl there...:blush:

OK, so my libcurl is, hrm.. v. 2. Guess that explains a lot.

Will get the right version and then reconpile php 4.4.4 with curl and see what happens... this could take a little bit of time....

Back as soon as I can get here,
Thanks Rob,
-Alyce

28 Nov 2006, 3:25 AM
#12
yodamo avatar

yodamo

New Zenner

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

Re: Fatal error: Maximum execution time

FIXED! :laugh:

Quite the "doh" moment indeed...
updated the slocate.db and realized I had more than one php.ini, and it turns out the one that wasn't in the outdated locate.db was the one that was pulled into php. :frusty:

However... throughout all of this I realized I really need to do some other updates... which is a good thing.

Works perfectly now, and is super fast too. Wahoooo!

Thanks Rob for your help--
-Alyce

28 Nov 2006, 5:21 AM
#13
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Fatal error: Maximum execution time

You're welcome for the help, Alyce. Hope your Server updates don't cause you even more problems -- as sometimes happens.

The learning is in the doing.

Potent Products