질문 Q #22507
ci4 out of memory 어떻게 하면 될까요....
마로3 2020-07-06 16:51:51

안녕하세요  

개발환경은 mysql 8.0, php 7.4 ci4 이렇게 쓰고 있습니다.

 

좀 무거운 쿼리이기는 하지만 1초이네에 바로 나오는 쿼리를 돌리는데..

아래와 같이 메시지를 던지고 동작을 안하네요..

PHP.ini에 들어가서 memory_limit 도 충분히 늘려 주었는데.. 

어디를 봐야 할까요?  막막하네요..ㅠㅠ

또 미리 감사 드립니다. 꾸뻑

 

<br />

<b>Fatal error</b>:  Out of memory (allocated 987758592) (tried to allocate 140509192 bytes) in <b>C:\WAS\Apache24\htdocs\system\Database\MySQLi\Connection.php</b> on line <b>331</b><br />

{

    "title": "ErrorException",

    "type": "ErrorException",

    "code": 500,

    "message": "Out of memory (allocated 987758592) (tried to allocate 140509192 bytes)",

    "file": "C:\\WAS\\Apache24\\htdocs\\system\\Database\\MySQLi\\Connection.php",

    "line": 331,

    "trace": [

        {

            "function": "shutdownHandler",

            "class": "CodeIgniter\\Debug\\Exceptions",

            "type": "->",

            "args": []

        }

    ]

}

 

답변 2
#1 변종원(웅파) 2020-07-06 17:34:34

메모리 리밋 푸시고 실행한 후에 메모리 얼마나 사용했는지 체크해보세요. 

일단은 쿼리튜닝을 하셔야할것 같습니다.

#2 엽토군 2020-07-07 22:50:44
쿼리 결과가 너무 많아서 그걸 메모리에 꼽다가 죽는건 아닌지요?