ambroslins commented on issue #11107:
URL: https://github.com/apache/apisix/issues/11107#issuecomment-3243890351

   > [@ambroslins](https://github.com/ambroslins) Hello, have you tried 
`apisix.dns_resolver_valid`?
   > 
   > 
[apisix/apisix/core/utils.lua](https://github.com/apache/apisix/blob/e90570a6eb4695af455cecca3d798283b84e1e9e/apisix/core/utils.lua#L101-L110)
   > 
   > Lines 101 to 110 in 
[e90570a](/apache/apisix/commit/e90570a6eb4695af455cecca3d798283b84e1e9e)
   > 
   >  local valid = table.try_read_attr(local_conf, "apisix", 
"dns_resolver_valid") 
   >  local enable_resolv_search_opt = table.try_read_attr(local_conf, 
"apisix", 
   >                                                       
"enable_resolv_search_opt") 
   >  local opts = { 
   >      nameservers = table.clone(dns_resolvers), 
   >      order = {"last", "A", "AAAA", "CNAME"}, -- avoid querying SRV 
   >  } 
   >   
   >  opts.validTtl = valid
   
   @SkyeYoung Looks like I messed up while testing this the first time. I think 
this setting does not affect the DNS discover and I am facing the same issue.
   
   I found a _hacky_ solution that works for me:
   ```bash
   sed -i '/    local opts = {/a\\        validTtl = 15,' 
/usr/local/apisix/apisix/discovery/dns/init.lua
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to