Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)

前端 未结 29 2496
天涯浪人
天涯浪人 2020-11-21 22:57

I have a bunch of client point of sale (POS) systems that periodically send new sales data to one centralized database, which stores the data into one big database for repor

29条回答
  •  执念已碎
    2020-11-21 23:27

    In my case it was a brief issue with the way a function was written. A memory leak can be caused by assigning a new value to a function's input variable, e.g.:

    /**
    * Memory leak function that illustrates unintentional bad code
    * @param $variable - input function that will be assigned a new value
    * @return null
    **/
    function doSomehting($variable){
        $variable = 'set value';
        // Or
        $variable .= 'set value';
    }
    

提交回复
热议问题