Suddenly received error message on drupal 10 url generated by ddev –
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/twig/twig/src/Environment.php(360) : eval()’d code on line 43.
In my project’s root directory inside .ddev directory created file –
mkdir -p .ddev/php
nano .ddev/php/php.ini
In the php.ini file, add the following line to increase the memory limit to,
memory_limit = 6G ddev restart
Created file –
web/phpinfo.php
Access the phpinfo.php file in my browser:
`http://your-ddev-site/phpinfo.php. to look for the memory_limit setting but nothing reflected.
error message turns to –
Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/twig/twig/src/Environment.php(360) : eval()’d code on line 43
Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 65536 bytes) in /var/www/html/vendor/composer/ClassLoader.php on line 576
Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 65536 bytes) in /var/www/html/vendor/composer/ClassLoader.php on line 576`
Please help to resolve this.