• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

States/Summary php error - is there an edit or System Tunable for php memory?

Scheduled Pinned Locked Moved General pfSense Questions
5 Posts 2 Posters 1.9k Views
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.
  • M
    makesense
    last edited by Dec 7, 2016, 8:27 PM

    2.2.4 Rel (amd64)
    Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
    8 CPUs: 2 package(s) x 4 core(s)
    16GB RAM

    this Dell PE1950 averages about 150,000 states

    When I choose Diag/States or Diag / States Summary I get:
    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /usr/local/www/diag_states.php on line 60
    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /usr/local/www/diag_states_summary.php on line 55

    Is there a System tunable or .php file edit I can make to fix these errors?

    BTW when the state table size total is much smaller (~60k states) these menu options work.

    Lastly, if this is a know issue, is there an alternative?

    I simply need to periodically see a report of IPs sorted by the total NUMBER of states each IP is using.

    thx

    1 Reply Last reply Reply Quote 0
    • M
      makesense
      last edited by Dec 7, 2016, 8:28 PM

      I'm aware of this but I do not see a specific fix:
      https://redmine.pfsense.org/issues/3796

      1 Reply Last reply Reply Quote 0
      • J
        jimp Rebel Alliance Developer Netgate
        last edited by Dec 7, 2016, 8:54 PM

        There isn't a good fix there. We have to stop the page from consuming too much RAM, or else it could cause problems, but where it runs out of RAM varies depending not only on the state table size but the size of the other summary data structures on the page. It's not easy to predict when it would run out of RAM and thus set a limit on processing.

        You could edit the page and add an ini_set call to increase the allowed RAM, but there isn't a more general solution available at the moment.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • M
          makesense
          last edited by Dec 8, 2016, 8:27 PM Dec 7, 2016, 9:22 PM

          Thanks for the timely and honest response.

          Did some digging in the forum…

          Here's the edit I added to diag_states_summary.php

          ini_set('memory_limit','768M');

          Testing...This did not change the error - I'm assuming I need to restart a service(s) or reboot for the change to take?

          1 Reply Last reply Reply Quote 0
          • M
            makesense
            last edited by Dec 8, 2016, 8:31 PM

            Also - I did find this info on the forum from others having similar issues installing pfblockerNG / php memory issues but I don't know if I need to do these edits too:

            for amd64 systems … change /etc/inc/config.inc (line 75) from 512M to 640M or 768M.
            Code: [Select]
            // Set memory limit to 512M on amd64.
            if ($ARCH == "amd64") {
              ini_set("memory_limit", "512M");
            } else {
              ini_set("memory_limit", "128M");
            }
            to
            Code: [Select]
            // Set memory limit to 512M on amd64.
            if ($ARCH == "amd64") {
              ini_set("memory_limit", "768M"); # amd64 Default 512M
            } else {
              ini_set("memory_limit", "128M");
            }
            AND modify the /usr/local/etc/php.ini (last line) and /etc/rc.php_ini_setup files (line 303) from
            Code: [Select]
            suhosin.memory_limit = 536870912
            to
            Code: [Select]
            suhosin.memory_limit = 671088640 # 640M Default 536870912
            or
            Code: [Select]
            suhosin.memory_limit = 805306368 # 768M Default 536870912

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received