Sporadic LDAP Query Failures

Does anyone know of a way to easily retry LDAP queries if I am receiving sporadic LDAP failures? The goal is to certainly find out why the failures are occurring though at this point I am trying to help alleviate the issue using an iRule, subroutine, etc. It seems like older versions of BIG-IP had the ability to increase retry events for LDAP queries when using APM though it doesn’t seem like that is still available. I am currently using 13.1.0.1.

Looks as though creating a loop using a macro is the way to go.