PHP Fatal: Maximum execution time of 0 seconds exceeded

556 views
Skip to first unread message

Mark Rogoyski

unread,
Oct 1, 2015, 7:09:24 PM10/1/15
to AdWords API Forum
In the past month, since August 27, 2015, we've been seeing the following PHP fatal error happen periodically:
PHP Fatal error:  Maximum execution time of 0 seconds exceeded

Here is a listing of error counts to show the most common files/lines where it has been happening (leftmost number is error count):
     40 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Lib/AdWordsSoapClient.php on line 129
     25 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 217
     13 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/XmlUtils.php on line 50
      9 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/SoapRequestXmlFixer.php on line 142
      3 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/XmlUtils.php on line 61
      2 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/XmlUtils.php on line 47
      2 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/SoapRequestXmlFixer.php on line 140
      2 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 531
      1 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/XmlUtils.php on line 48
      1 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/XmlUtils.php on line 0
      1 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/SoapRequestXmlFixer.php on line 93
      1 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/SoapRequestXmlFixer.php on line 152
      1 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Util/SoapRequestXmlFixer.php on line 135
      1 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 533
      1 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 532
      1 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 179
      1 PHP Fatal error:  Maximum execution time of 0 seconds exceeded in /path/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 0

We are running API v201506 using the PHP Client Library googleads/googleads-php-lib v6.1.0.

PHP CLI INI max_execution_time is set to 0, and max_input_time is set to -1, if that information is relevant.

Any ideas on why this fatal error may be occurring, or any suggestions on how to prevent it?

Thanks.
Mark

Umesh Dengale

unread,
Oct 2, 2015, 10:47:13 AM10/2/15
to AdWords API Forum
Hi Mark,

You are getting Maximum execution time of 0 seconds exceeded error as max_execution_time is set to zero at your end and not related to the AdWords API. For setting value for the property max_execution_time (default value is 30 seconds), please check this PHP guide.

Thanks,
Umesh, AdWords API Team.

Mark Rogoyski

unread,
Oct 2, 2015, 10:57:00 AM10/2/15
to AdWords API Forum
Hi Umesh,

As I stated, it's a CLI script that is using the AdWords API and according to the PHP documentation that you linked and I referenced in my post, max_execution_time has a default value of 0. Furthermore, according to the PHP documentation, no time limit is imposed if set to 0 (http://php.net/manual/en/function.set-time-limit.php).

So my question again is, why would this error be happening in the AdWords API code if I'm following the PHP-documented way for no execution time timeout? Any ideas on what is going on?

Thanks.
Mark

Thanet Knack Praneenararat (AdWords API Team)

unread,
Oct 3, 2015, 2:38:10 AM10/3/15
to AdWords API Forum
Hi Mark,

Could you please give me more info about your development environment, such as PHP version, OS, etc.
Also, when did this happen? Do you incorporate these classes in your project?
Or did this happen just when you run our example files simply?

To me, the errors look very random, but seem to occur with SOAP and XML related portions.
So, you may want to investigate your PHP settings about those components again.

Cheers,
Thanet, AdWords API Team

Mark Rogoyski

unread,
Oct 5, 2015, 4:41:09 PM10/5/15
to AdWords API Forum
Hi Thanet,

This is the PHP version info:
PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

We have been using the AdWords PHP Client Library in our production code for 2+ years and haven't made any significant environment changes. I mentioned in the original post that we started seeing these errors occur on Aug 27. However, they have not been happening in the last few days. I'll keep monitoring and update if they start happening again.

Thanks.
Mark

Thanet Knack Praneenararat (AdWords API Team)

unread,
Oct 6, 2015, 8:11:30 AM10/6/15
to AdWords API Forum
Hi Mark,

Thanks for letting us know.
Feel free to contact us if this happens again.

Best,
Thanet, AdWords API Team
Reply all
Reply to author
Forward
0 new messages