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

Allowed memory size exhausted

Scheduled Pinned Locked Moved webGUI
7 Posts 4 Posters 2.6k 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.
  • I
    it-marmalade
    last edited by Feb 2, 2015, 2:05 PM

    Hello,

    A little bit of background info first:

    Our set up is 2 x 2.1.15 nodes running CARP.
    Recently I decided to disable DHCP on the backup node.
    The reason was it assigning IPs out of sync with the primary node.
    We have never seen duplicate IPs on the network.
    The problem was the master node's DNS (the default dnsmasq) couldn't resolve entries not present in its own DHCP lease table.
    So basically DHCP lease tables were out of sync.

    Now the error which only happens on backup node when I try to manually delete DHCP leases:

    https://x.x.x.x/status_dhcp_leases.php?deleteip=y.y.y.y&all=
    
    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 2 bytes) in /usr/local/www/status_dhcp_leases.php on line 60
    

    Both nodes have 4GB of memory.
    The current memory usage is reporting as 15% on the master and 22% on the backup node (not sure why it's significantly more on backup).
    Any ideas regarding the php error?

    Thanks
    Adam

    1 Reply Last reply Reply Quote 0
    • P
      phil.davis
      last edited by Feb 2, 2015, 2:44 PM

      That line is:

      $leases_contents = file($leasesfile);
      

      How big is /var/dhcpd/var/db/dhcpd.leases ?

      Something is going wrong sucking all the lines into an array $leases_contents

      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

      1 Reply Last reply Reply Quote 0
      • I
        it-marmalade
        last edited by Feb 2, 2015, 3:05 PM

        The file sizes are small:

        1,368,718 bytes on the backup (problematic) node and 142,814 on master.

        The size difference between nodes is worrying…

        Would you suggest deleting the file on backup, starting DHCP on backup  and allowing full DHCP CARP resync from master?

        1 Reply Last reply Reply Quote 0
        • P
          phil.davis
          last edited by Feb 2, 2015, 4:16 PM

          Certainly the size on the backup is too big.
          Not being at all knowledgeable about CARP, I will let someone else give you advice on how to fix it - obviously the one on the backup needs to become the same as the master  :P

          As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
          If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

          1 Reply Last reply Reply Quote 0
          • I
            it-marmalade
            last edited by Feb 3, 2015, 11:37 AM

            Deleting  /var/dhcpd/var/db/dhcpd.leases has done the trick.

            It also fixed the problem of some of the DHCP assigned hosts not resolving in DNS.

            No both notes happily run DHCP and all DNS is resolving.

            1 Reply Last reply Reply Quote 0
            • C
              cmb
              last edited by Feb 4, 2015, 9:57 AM

              Yeah deleting the leases file there is fine. I was curious how it got to be so big, but guess it's too late to ask that now. :)

              What you describe there is a bug caused by ISC dhcpd not syncing the hostname as a part of leases to its peers. So each host only knows about the hostnames for which it issued the lease. We have an open bug ticket on it.
              https://redmine.pfsense.org/issues/4061

              1 Reply Last reply Reply Quote 0
              • D
                doktornotor Banned
                last edited by Feb 4, 2015, 10:10 AM

                @cmb:

                Yeah deleting the leases file there is fine. I was curious how it got to be so big, but guess it's too late to ask that now. :)

                Hmmm… could be bigger I guess? Found a ~23MB dhcpd6.leases file here on a full install. (About a year old, DHCPv6 not used any more on that box.)

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