티스토리 뷰

프로젝트 진행중 갑작스럽게 특정페이지에서 500error가 발생되어 당황했었는데, 


php error로그에 아래와 같은 에러가 발생하고있었다.

Fatal error: Maximum function nesting level of 'xxx' reached 


조금 찾아보니 xdebug를 활성화시 아래의 설정값과 연관되어 발생한 에러로 재귀함수로 인한 무한루프를 보호하는 값이다. 

php.ini에서 해당 값을 조금 변경해서 해결하였는데 템플릿 구문에서 루프문이 재귀 100번을 넘겼다고하니.. 개선이 필요할듯 하다..

아래는 xdebug에서 찾은 설명이다.

xdebug.max_nesting_level


Type: integer, Default value: 256

Controls the protection mechanism for infinite recursion protection. The value of this setting is the maximum level of nested functions that are allowed before the script will be aborted.


Before Xdebug 2.3, the default value was 100.




댓글