XDebug automatically open PHP Stack Trace, resulting in PHP Log Super 1g_php Tutorial

Source: Internet
Author: User
Tags php debug stack trace
Yesterday morning suddenly found that the test server space is full, with Du folder view, found that PHP debug log occupies a large area, some log directly have 1G, opened after the discovery of extremely many PHP stack trace.

Immediately to the master server view, the primary server log is more than 400 m log, fortunately, the primary server space is sufficient.

So many stack traces, to be sure that none of the previous, look at the log, is one day early on a time occurred.

Solution:

1. Is it the previous upgrade of PHP caused, to search the web PHP stack trace, all show how to open, but not how to shut down. Carefully find the PHP parameters, only find ignore_repeated_sources and ignore_repeated_error these two seemingly related things, the change will not be the same.

2. If it is not the upgrade of PHP, and then carefully think about what changes these days, which are related to PHP trace, think of Xdebug. , first try to remove the Xdebug, OK, the problem disappears. Certainly is the problem of the Xdebug, the beginning of the time did not directly find Xdebug official documents, the use of Phpinfo xdebug all the parameters are played out, first guess is which parameters, try a few do not, and then just calm down to see the official document of Xdebug, found the following words:

Stack Traces

When Xdebug is activated it'll show a stack trace whenever PHP decides to show a notice, warning, error etc. The information that stack traces display, and the "how" they is presented, can be configured to suit your needs.

Have a chance, and then continue to find a name and use how you can not contact the variable "xdebug.default_enable", is really this parameter to control, as follows.

Xdebug.default_enable

Type: Boolean , Default value: 1

If This setting are 1, then stacktraces'll be shown by default on the An error event. You can disable showing stacktraces from your code withxdebug_disable (). As this is one of the basic functions of Xdebug, it's advisable to leave this setting set to 1. This problem almost toss a day, experience: to encounter unexpected problems to calm, although the impact of many original plan, but if the problem is serious problems must be resolved first, otherwise, will form a habit. In addition, when using some off-the-shelf function modules, after searching for the most vent, you have to calm down and read the official documents carefully.

http://www.bkjia.com/PHPjc/766187.html www.bkjia.com true http://www.bkjia.com/PHPjc/766187.html techarticle yesterday morning suddenly found that the test server is full of space, with Du folder view, found that PHP debug log occupies a large area, some log directly 1G, opened after the discovery of an extremely large number of PHP stack ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.