bin-53 commented on issue #9327:
URL: https://github.com/apache/apisix/issues/9327#issuecomment-1517173876

   > > > @bin-53 can you attache the error.log ?
   > > > which file can found from apisix logs directory.
   > > > The more certain thing is that this implementation does have the 
[problem](https://github.com/Kong/lua-resty-healthcheck/pull/57/files) of 
inaccurate interval.
   > > 
   > > 
   > > Thank your reply~ There is no error log output in this health interval 
check, and neither is my access log. Excuse me, which configuration do I need 
to modify? I can output a detailed error log or access log during the health 
check,thanks
   > 
   > can you try this config ?
   > 
   > ```diff
   > diff --git a/conf/config-default.yaml b/conf/config-default.yaml
   > index 4f97adc4..f2796416 100755
   > --- a/conf/config-default.yaml
   > +++ b/conf/config-default.yaml
   > @@ -136,7 +136,7 @@ nginx_config:                     # config for render 
the template to generate n
   >                                    # the "user" directive makes sense only 
if the master process runs with super-user privileges.
   >                                    # if you're not root user,the default 
is current user.
   >    error_log: logs/error.log
   > -  error_log_level:  warn          # warn,error
   > +  error_log_level:  info          # warn,error
   >    worker_processes: auto          # if you want use multiple cores in 
container, you can inject the number of cpu as environment variable 
"APISIX_WORKER_PROCESSES"
   >    enable_cpu_affinity: false      # disable CPU affinity by default, if 
APISIX is deployed on a physical machine, it can be enabled and work well.
   >    worker_rlimit_nofile: 20480     # the number of files a worker process 
can open, should be larger than worker_connections
   > diff --git a/conf/debug.yaml b/conf/debug.yaml
   > index 23c8d51a..268d744c 100644
   > --- a/conf/debug.yaml
   > +++ b/conf/debug.yaml
   > @@ -15,7 +15,7 @@
   >  # limitations under the License.
   >  #
   >  basic:
   > -  enable: false
   > +  enable: true
   >  http_filter:
   >    enable: false         # enable or disable this feature
   >    enable_header_name: X-APISIX-Dynamic-Debug # the header name of dynamic 
enable
   > ```
   > 
   > and to reproduce this issues .
   Hello, I have modified the configuration file, but there is no log output 
available during the health check
   
![image](https://user-images.githubusercontent.com/131146587/233526977-4b9c5416-bd69-4325-8cda-7b534bc43f1d.png)
   
![image](https://user-images.githubusercontent.com/131146587/233526997-c27a8695-a180-48c1-a905-e2f275b90877.png)
   ```
   apisix:
     node_listen: 9080              # APISIX listening port
     enable_ipv6: false
     ssl:
       enable: true
       enable_http2: true
       ssl_trusted_certificate: /usr/local/apisix/conf/cert/apisix.ca-bundle
   
     allow_admin:                  # 
http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
       - 0.0.0.0/0              # We need to restrict ip access rules for 
security. 0.0.0.0/0 is for test.
   
     admin_key:
       - name: "admin"
         key: edd1c9f034335f136f87ad84b625c8f1
         role: admin                 # admin: manage all configuration data
                                     # viewer: only can view configuration data
       - name: "viewer"
         key: 4054f7cf07e344346cd3f287985e76a2
         role: viewer
     
     enable_control: true
     control:
       ip: "0.0.0.0"
       port: 9092
   
   etcd:
     host:                           # it's possible to define multiple etcd 
hosts addresses of the same etcd cluster.
       - "http://etcd:2379";     # multiple etcd address
     prefix: "/apisix"               # apisix configurations prefix
     timeout: 30                     # 30 seconds
   
         
   nginx_config:                     # config for render the template to 
generate nginx.conf
     error_log: logs/error.log
     error_log_level:  info   
     worker_processes: 1          # if you want use multiple cores in 
container, you can inject the number of cpu as environment variable 
"APISIX_WORKER_PROCESSES"
     stream:
       lua_shared_dict:
         internal-status: 10m
         plugin-limit-req: 10m
         plugin-limit-count: 10m
         prometheus-metrics: 10m
         plugin-limit-conn: 10m
         upstream-healthcheck: 10m
         worker-events: 10m
         lrucache-lock: 100m
         balancer-ewma: 10m
         balancer-ewma-locks: 10m
         balancer-ewma-last-touched-at: 10m
         plugin-limit-count-redis-cluster-slot-lock: 100m
         tracing_buffer: 10m
         plugin-api-breaker: 10m
         etcd-cluster-health-check: 10m
         discovery: 1m
         jwks: 1m
         introspection: 10m
         access-tokens: 1m
         ext-plugin: 1m
         tars: 1m
         cas-auth: 10m
   #  http:
   #    enable_access_log: true         # enable access log or not, default true
   #    access_log: logs/access.log
   #    access_log_format:     '$remote_addr - [$remote_addr] - $remote_user 
[$time_local] "$request" $status $body_bytes_sent "$http_referer" 
"$http_user_agent" $request_length $request_time  $upstream_addr 
$upstream_response_length $upstream_response_time $upstream_status  $host 
[$http_client_v] [$http_device_id] [$http_utm_source] [$http_platform_brand] 
[$scheme] '
       
   plugin_attr:
     prometheus:
       export_addr:
         ip: "0.0.0.0"
         port: 9091
   
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to