Describe the bug
The published docker-compose.yml includes the environment variable 'memory_limit=500' for the Kimai container. This is interpreted as 500 bytes and causes errors as this limit would be below the current value, so it can't bet set. This came in with commit 7212829 on Feb 10 and is somewhat related to issue #503.
Changing the 'memory_limit' from '500' to '500M' should be read as 500 MB and set an appropriate memory limit. In my case all the errors have gone away and the logs are clean.
Check the Kimai container logs for errors like this:
[24-Jun-2023 19:20:37] NOTICE: PHP message: PHP Warning: Failed to set memory limit to 500 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36864 bytes) in /opt/kimai/vendor/twig/twig/src/TokenStream.php on line 41
Server:
OS: Debian 11
Docker version: 20.10.5+dfsg1
ansible-playbook [core 2.14.1] with python version = 3.11.1 and jinja version = 3.1.2
Kimai: 2.0.26
Command used to run the container
I turned the compose file into an Ansible role, so please excuse the added layer of abstraction and different syntax, but the variable names should be straight forward, and the relevant line is not affected by my changes.
Describe the bug The published docker-compose.yml includes the environment variable 'memory_limit=500' for the Kimai container. This is interpreted as 500 bytes and causes errors as this limit would be below the current value, so it can't bet set. This came in with commit 7212829 on Feb 10 and is somewhat related to issue #503. Changing the 'memory_limit' from '500' to '500M' should be read as 500 MB and set an appropriate memory limit. In my case all the errors have gone away and the logs are clean.
To Reproduce Steps to reproduce the behaviour:
[24-Jun-2023 19:20:37] NOTICE: PHP message: PHP Warning: Failed to set memory limit to 500 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
18:20:37 CRITICAL [php] Fatal Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36864 bytes) ["exception" => Symfony\Component\ErrorHandler\Error\OutOfMemoryError { …}]
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36864 bytes) in /opt/kimai/vendor/twig/twig/src/TokenStream.php on line 41
Server:
Command used to run the container I turned the compose file into an Ansible role, so please excuse the added layer of abstraction and different syntax, but the variable names should be straight forward, and the relevant line is not affected by my changes.
Personal message Thank you to tobybatch and kevinpapst for all the time and effort going into this project. Awesome open source!