Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved HTTP ERROR 500 when accessing "Weekly working hours" page

    Kimai
    3
    9
    309
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      nathan last edited by

      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.

      nebulon 1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff @nathan last edited by

        @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.

        1 Reply Last reply Reply Quote 2
        • N
          nathan last edited by nathan

          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?

          nebulon 1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff @nathan last edited by

            @nathan actually this could very well be the php memory limit. Can you try to add the following to /app/data/php.ini:

            memory_limit = 128M
            

            and also make sure the app as such has the limit higher than that.

            N 1 Reply Last reply Reply Quote 1
            • N
              nathan @nebulon last edited by

              @nebulon

              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?

              N 1 Reply Last reply Reply Quote 0
              • N
                nathan @nathan last edited by

                @nebulon

                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?

                girish 2 Replies Last reply Reply Quote 0
                • girish
                  girish Staff @nathan last edited by

                  @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

                  1 Reply Last reply Reply Quote 1
                  • girish
                    girish Staff @nathan last edited by

                    @nathan I have published a new version. Can you update and try?

                    N 1 Reply Last reply Reply Quote 1
                    • N
                      nathan @girish last edited by

                      @girish Looks like that fixed it. No more loading issues, and no more log errors. Thanks!

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB