昨天早上突然发现测试服务器空间满了,用du挨个文件夹查看,发现是php debug log占地极大,有的log直接有1G,打开后发现极其多的php stack trace.

立刻到主服务器查看,主服务器日志也400多M的日志,幸好主服务器空间足够。

那么多stack trace,可以肯定之前是没有的,挨个查看日志,是某一天早上一个时刻发生的。

解决方案:

1. 难道是之前升级php导致,到网上搜索php stack trace,所有的都是显示如何打开,却没有如何关闭的。仔细查找php的参数,只找到ignore_repeated_sources和ignore_repeated_error这两个看似有关的东西,更改后也不顶用。

2. 如果不是升级php所致,再仔细想这几天做了什么 改动,哪些是和php trace有关的,想起xdebug. ,先尝试把xdebug删除,OK,问题消失了。肯定是xdebug的问题了,开始的时候没有直接找xdebug的官方文档,利用phpinfo把xdebug所有的参数都打出来,先猜是哪个参数,试了几个都不顶用, 后来才静下心来看看xdebug的官方文档吧,发现了如下话语:

Stack Traces

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

有戏,再继续找,发现了一个名称和用途你如何也联系不上的变量"xdebug.default_enable",还真就是这个参数来控制了,如下。

xdebug.default_enable

Type: boolean, Default value: 1

If this setting is 1, then stacktraces will be shown by default on an error event. You can disable showing stacktraces from your code withxdebug_disable(). As this is one of the basic functions of Xdebug, it is advisable to leave this setting set to 1.
 
这个问题几乎折腾一天,心得:碰到意外问题时要冷静,虽然影响了多原有计划,但如果问题是严重的问题就一定要排除万难先解决了再说,不然会形成习惯。另外,使用一些现成功能模块时,在在最衩进行搜索无果后,得静下心来仔细阅读官方文档。

XDebug 自动开启PHP Stack Trace, 导致PHP Log 超1G的更多相关文章

  1. 使用WCF的Trace与Message Log功能

      原创地址:http://www.cnblogs.com/jfzhu/p/4030008.html 转载请注明出处   前面介绍过如何创建一个WCF Service http://www.cnblo ...

  2. 让Xcode的 stack trace信息可读

    让Xcode的 stack trace信息可读 昨天在写 iOS 代码的时候,调试的时候模拟器崩溃了.异常停在了如下整个 main 函数的入口处: int main(int argc, char *a ...

  3. 三、jdk工具之jstack(Java Stack Trace)

    目录 一.jdk工具之jps(JVM Process Status Tools)命令使用 二.jdk命令之javah命令(C Header and Stub File Generator) 三.jdk ...

  4. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.

    好久没有冒泡了,最近在新环境上搭建应用时,启动报错: INFO: Illegal access: this web application instance has been stopped alre ...

  5. This is very likely to create a memory leak. Stack trace of thread

    1.错误描述 警告: The web application [cmp] appears to have started a thread named [Abandoned connection cl ...

  6. 关于CLOSE BY CLIENT STACK TRACE

    关于CLOSE BY CLIENT STACK TRACE 程序正常运行,数据库连接可以获取,一些列操作都可以实现,可在debug信息中总会一段时间就报如下错误: java.lang.Exceptio ...

  7. dump 分析模式之 INCORRECT STACK TRACE - djm2005dy的专栏 - 博客频道 - CSDN.NET

    Dump 分析模式之 INCORRECT STACK TRACE dump 分析模式之 INCORRECT STACK TRACE 翻译自 MDA-Anthology Page288  初学者常犯的错 ...

  8. Rethrowing exceptions and preserving the full call stack trace

    refer:http://weblogs.asp.net/fmarguerie/archive/2008/01/02/rethrowing-exceptions-and-preserving-the- ...

  9. Eclipse下Android开发错误之Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace

    升级了Android版本后,在运行应用时提示: [2013-11-27 10:37:35 - Dex Loader] Unable to execute dex: java.nio.BufferOve ...

随机推荐

  1. 1.UI初认识

    前节:app是什么? app英文全称:application 应用程序,简称应用.也就是手机应用的简写 出处:http://www.cnblogs.com/mcj-coding/p/5098254.h ...

  2. 【xcode5的使用】

    layout: post title: "WWDC 2013 Session笔记 - Xcode5和ObjC新特性" date: 2013-06-13 10:05 comments ...

  3. POJ1288 Sly Number(高斯消元 dfs枚举)

    由于解集只为{0, 1, 2}故消元后需dfs枚举求解 #include<cstdio> #include<iostream> #include<cstdlib> ...

  4. Swift中的一些关键字

    以下关键字关于引用传参.属性.修改成员变量.静态变量.索引和构造函数重载 读过The Swift Programming Language的人都能看得出,我上面的这几个说法全不是apple的习惯用语. ...

  5. C# 读本地INI文件方法

    [DllImport("kernel32")]//加载dll private static extern int GetPrivateProfileString(string se ...

  6. python操作日期和时间的方法

    不管何时何地,只要我们编程时遇到了跟时间有关的问题,都要想到 datetime 和 time 标准库模块,今天我们就用它内部的方法,详解python操作日期和时间的方法.1.将字符串的时间转换为时间戳 ...

  7. 【游戏开发】小白学Lua(上)

    在很多游戏中,脚本语言是不可或缺的一部分,很多游戏都使用到了Lua,js,python一类的脚本,脚本语言可以在很多方面给开发进程带来帮助.脚本语言可以作为初始化文件读入变量和游戏数据的一个快速而方便 ...

  8. 我的jQuery源码读后感

    (function(window, undefined) { // 构造jQuery对象 var jQuery = (function() { var jQuery = function(select ...

  9. Android -- 时间轴(ListView)

    1. 实现效果

  10. About_Return

    返回值:return return 表示从被调函数返回到主调函数继续执行,返回时可附带一个返回值,由return后面的参数指定. return通常是必要的,因为函数调用的时候计算结果通常是通过返回值带 ...