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

    DHCP lease - 504 Gateway Time-out

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 408 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.
    • empbillyE
      empbilly
      last edited by empbilly

      Hello,

      When accessing the dhcp lease, error 504 Gateway Time-out occurs. I've tried some of the options listed in the topics I found with the same problem, but as they are older topics, I believe they have already been fixed.

      • I'm using version 2.7.2
      • Two appliances with HA CARP
      • The DNS configured in System > General Setup is our local authoritative DNS
      • DNS forwarder active on some interfaces

      The error in Status > System Logs > System > General is:

      2024/05/09 20:41:43 [error] 86295#100359: *110120 upstream timed out (60: Operation timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: , request: “GET /status_dhcp_leases.php HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php-fpm.socket”, host: “pfmaster.sertao.ifrs.edu.br”, referrer: “https://pfmaster.sertao.ifrs.edu.br/”
      

      lease file

      ls -laht dhcpd.leases
      -rw-r--r-- 1 dhcpd _dhcp 2.1M May 9 20:44 dhcpd.leases
      
      grep -o -i 'lease' dhcpd.leases | wc -l
          18967
      

      Anything else I can provide to help solve the problem?

      EDIT:
      ###### After resetting dhcpd.leases on both appliances following the wiki and rebooting, the dhcp lease page is ok again.

      https://eliasmoraispereira.wordpress.com/

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @empbilly
        last edited by

        @empbilly your leases file was 2.1M?

        I was just curious what mine was ;)

        [23.09.1-RELEASE][admin@sg4860.home.arpa]/var/dhcpd/var/db: ls -laht dhcpd.leases
        -rw-r--r--  1 dhcpd _dhcp   18K May  9 20:10 dhcpd.leases
        [23.09.1-RELEASE][admin@sg4860.home.arpa]/var/dhcpd/var/db: grep -o -i 'lease' dhcpd.leases | wc -l
              74
        [23.09.1-RELEASE][admin@sg4860.home.arpa]/var/dhcpd/var/db: 
        
        

        What is it now?

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        empbillyE 1 Reply Last reply Reply Quote 0
        • empbillyE
          empbilly @johnpoz
          last edited by

          @johnpoz said in DHCP lease - 504 Gateway Time-out:

          your leases file was 2.1M?

          At first, yes.

          Does the lease file only contain the IPs that have been granted or does it list all the possible IPs configured in the dhcp of each vlan?

          https://eliasmoraispereira.wordpress.com/

          johnpozJ 1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @empbilly
            last edited by johnpoz

            @empbilly it should only have actual leases that have been handed out.

            Take a look for example - here is lease my applewatch just got

            lease 192.168.2.221 {
              starts 5 2024/05/10 11:57:58;
              ends 6 2024/05/11 11:57:58;
              cltt 5 2024/05/10 11:57:58;
              binding state active;
              next binding state free;
              rewind binding state free;
              hardware ethernet 7c:61:30:ad:55:47;
              uid "\001|a0\255UG";
              client-hostname "JohnsAppleWatch";
            }
            

            Guess you could of something going bonkers and just kept grabbing new lease all the time.. But 18k some leases, is that the size of your network - do you have anything even close to that many devices on your network.. Or was something just grabbing up leases like crazy?

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.