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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Invoice Ninja
  3. InvoiceNinja

InvoiceNinja

Scheduled Pinned Locked Moved Solved Invoice Ninja
8 Posts 3 Posters 1.8k Views 3 Watching
  • 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.
  • T Offline
    T Offline
    tamayers
    wrote on last edited by
    #1

    Hello! I am trying to import a JSON file backup into InvoiceNinja but I am getting a 500 error during the upload. It appears from the logs that the php memory limit for the app is being hit:

    PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /app/code/app/Services/ImportService.php on line 284
    

    How can I edit the PHP memory limit for Invoice Ninja in the Cloudron App?

    1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Hi there,

      you can adjust the upper memory limit via the Cloudron dashboard. In the advanced tab of the app configure dialog you have a slider to do so.

      Best,
      Johannes

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tamayers
        wrote on last edited by
        #3

        @nebulon Thank you. I have done that but I am still running it issues. I have set over 2GBs to the app in the advanced tab but it appears that PHP is still limited to 128MB. I need a way to up that memory...

        Typically, I would do that in the .htaccess file but it appears those are read-only on Cloudron...? How else can I up the PHP memory limit?
        php_value memory_limit 2048M

        1 Reply Last reply
        0
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #4

          Sorry for the late reply. Indeed the php memory limit is fixed for the app.
          Currently the only way to temporarily change that, is to use the cloudron cli tool and reconfigure the app with cloudron configure --app <id/domain> --debug then open a remote terminal into the app with cloudron exec --app <id/domain> and change the value in the php.ini. Then manually start the app from that remote terminal with /app/code/start.sh and perform the import. Once done reconfigure the app again to be in production state with cloudron configure --app <id/domain> --no-debug

          Arguably this is far from convenient and likely error prone, not sure how we could solve such burst memory requirements more elegantly.

          murgeroM 1 Reply Last reply
          0
          • T Offline
            T Offline
            tamayers
            wrote on last edited by
            #5

            @nebulon Running into this same issue on NextCloud... the install is limiting the PHP memory limit to 128mb.. NextCloud recommends at least 512mb. There REALLY needs to be a way to adjust this limit for the app.

            1 Reply Last reply
            0
            • nebulonN nebulon

              Sorry for the late reply. Indeed the php memory limit is fixed for the app.
              Currently the only way to temporarily change that, is to use the cloudron cli tool and reconfigure the app with cloudron configure --app <id/domain> --debug then open a remote terminal into the app with cloudron exec --app <id/domain> and change the value in the php.ini. Then manually start the app from that remote terminal with /app/code/start.sh and perform the import. Once done reconfigure the app again to be in production state with cloudron configure --app <id/domain> --no-debug

              Arguably this is far from convenient and likely error prone, not sure how we could solve such burst memory requirements more elegantly.

              murgeroM Offline
              murgeroM Offline
              murgero
              App Dev
              wrote on last edited by
              #6

              @nebulon You could have the configuration step make the memory limit 50-75% what the current memory is but then max it at some point (say we max it at 128MB):

              Examples:

              Setup 1: App memory set to 256MB, php memory limit would be 128MB.

              Setup 2: App memory set to 512MB, php memory limit would be 128MB.

              Setup 3: App memory set to 128MB, php memory limit would be 64MB.

              So on and so on.

              --
              https://urgero.org
              ~ Professional Nerd. Freelance Programmer. ~

              1 Reply Last reply
              0
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #7

                That is a good idea and the ratio should probably depend on the app. I mention this, since Nextcloud has a similar issue to be solved.

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #8

                  An app package version which follows your proposal of 50% memory limit setting for PHP was just published. Does it work for you as expected now?

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search