HTTP ERROR 500 when accessing "Weekly working hours" page
-
One of our users is not able to access the "Weekly working hours" page intermittently. If they hit the refresh button a few times, it usually loads after two or three tries. This only affects the one user. I'm thinking it may have something to do with a large amount of project listings on their "Weekly working hours" page, but I'm not sure.
The var/log/prod.log is empty, and I don't see anything in the Cloudron log either. -
@nathan this sounds more like an application bug. Can you report this with the kimai project itself and post the link to the issue/forumentry here?
If this is resource related, maybe check and increase the memory limit for the app and/or mysql service via the Cloudron dashboard.
-
Confirmed, here is the link to the post on Kimai's github: https://github.com/kevinpapst/kimai2/discussions/3059
I have increased the memory limit since then, but it has not seemed to help. I'll post the Kimai prod.log entries here as well, in case it helps:
[2022-01-07 13:21:06] request.INFO: Matched route "quick_entry". {"route":"quick_entry","route_parameters":{"_route":"quick_entry","begin":null,"_controller":"App\Controller\QuickEntryController::quickEntry","_locale":"en"},"request_uri":"https://my.kimai.com/en/quick_entry","method":"GET"} []
[2022-01-07 13:21:06] security.DEBUG: Read existing security token from the session. {"key":"_security_secured_area","token_class":"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken"} []
[2022-01-07 13:21:06] security.DEBUG: User was reloaded from a user provider. {"provider":"App\Security\KimaiUserProvider","username":"person"} []
[2022-01-07 13:21:06] security.DEBUG: Checking for guard authentication credentials. {"firewall_key":"secured_area","authenticators":1} []
[2022-01-07 13:21:06] security.DEBUG: Checking support on guard authenticator. {"firewall_key":"secured_area","authenticator":"App\Security\TokenAuthenticator"} []
[2022-01-07 13:21:06] security.DEBUG: Guard authenticator does not support the request. {"firewall_key":"secured_area","authenticator":"App\Security\TokenAuthenticator"} []
[2022-01-07 13:21:07] php.CRITICAL: Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 143360 bytes) {"exception":"[object] (Symfony\Component\ErrorHandler\Error\OutOfMemoryError(code: 0): Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 143360 bytes) at /app/code/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117)"} []EDIT: Is it possible that I need to increase the memory limit of one of the services, instead of Kimai?
-
Kimai has a 2 GB memory limit currently.
I added that line to the php.ini in Kimai, and rebooted Kimai from the Cloudron panel. I then did the same again with
256M
. I got the same error each time:[2022-01-07 17:09:48] php.CRITICAL: Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2105344 bytes) {"exception":"[object] (Symfony\Component\ErrorHandler\Error\OutOfMemoryError(code: 0): Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2105344 bytes) at /run/kimai/cache/prod/twig/1f/1f96a1be1b05a205498d597983e88903dced893044df82d2d3324d14269c59ff.php:1203)"} []
[2022-01-07 17:09:48] request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\OutOfMemoryError: "Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2105344 bytes)" at /run/kimai/cache/prod/twig/1f/1f96a1be1b05a205498d597983e88903dced893044df82d2d3324d14269c59ff.php line 1203 {"exception":"[object] (Symfony\Component\ErrorHandler\Error\OutOfMemoryError(code: 0): Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2105344 bytes) at /run/kimai/cache/prod/twig/1f/1f96a1be1b05a205498d597983e88903dced893044df82d2d3324d14269c59ff.php:1203)"} []Is it saying php only has 67108864 bytes available? If so, Am I missing a step in getting it to read the php.ini?
-
I'm assuming the php in Kimai is not reading or is overriding the
/app/data/php.ini
file, from the reply I got from the Kimai dev, and with further testing that didn't change the value in the error messages.Would you know where the php memory limit is being set to
64M
, if that's the case? Could Cloudron be messing with that value? -
@nathan yes, correct, I was just making a new build in fact, after I saw the error message in your post. https://git.cloudron.io/cloudron/kimai-app/-/commit/c60989cd67657fafe65428ea30de202cdd851386
-