Forum Discussion

R_Marc_77962's avatar
R_Marc_77962
Icon for Nimbostratus rankNimbostratus
Feb 19, 2016

Connection limit logging

I've set connection limits on some pool members. I was wanting to log when a connection is rejected because of that limit. I was under the impression there would be something like MAX Clients error in apache, but thus far I haven't seen anything like that.

 

I'd prefer to do it via an iRule, so I can capture the IP and port of the client in a log. I wasn't sure what event that might land in (first thought was LB_FAILED, but wasn't sure).

 

1 Reply

  • Hi R Marc,

    you may try the snippet below to collect some

    LB_FAILED
    information.

    when LB_FAILED {
        log local0.debug "Client: [IP::client_addr]:[TCP::client_port], Pool: [LB::server pool], Online Pool Members: [active_members [LB::server pool]], Member: [LB::server addr], Member-Status: [LB::status]"
     }
    

    But I guess it would never trigger on the node specific connection limits, unless every single pool member has exhausted its limit (in this case the entire pool will be down). If just a single member has reached its limit, then the member would be just skipped during LB selection and causing no errors...

    You could also try to monitor the

    PERSIST_DOWN
    event, in the case you're using a session table based persistence method. This event should trigger for those clients, that have an active persistence entry for the node that has just reached its connection limits (or is somehow marked as down because of other reasons).

    when PERSIST_DOWN {
        log local0.debug "Client: [IP::client_addr]:[TCP::client_port], Pool: [LB::server pool], Online Pool Members: [active_members [LB::server pool]], Member: [LB::server addr], Member-Status: [LB::status]"
    }
    

    Cheers, Kai