You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "iamacnhero (via GitHub)" <gi...@apache.org> on 2023/07/12 02:56:46 UTC

[GitHub] [apisix] iamacnhero opened a new issue, #9819: help request: I use enable_compression in log-rotate plugin, but apisix did not delete the original access log

iamacnhero opened a new issue, #9819:
URL: https://github.com/apache/apisix/issues/9819

   ### Description
   
   I configged in config.yml like this:
   
   ```
   plugin_attr:
     log-rotate:
         interval: 86400             # rotate interval (unit: second)
         max_kept: 30                # max number of log files will be kept
         max_size: -1                # max size of log files will be kept
         enable_compression: true    # enable log file compression(gzip) or not, default false
   ```
   
   but the original log does not deleted:
   
   <img width="707" alt="image" src="https://github.com/apache/apisix/assets/775369/ca7a9beb-7408-4ddd-88c3-a42d6cf9d2cb">
   
   why? how should I fix this ?
   
   ### Environment
   
   - APISIX version: 3.0.0
   - Operating system: Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 GNU/Linux
   - OpenResty / Nginx version: openresty/1.21.4.1
   - etcd version: 3.5.9
   - Plugin runner version, for issues related to plugin runners: log-rotate
   


-- 
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-unsubscribe@apisix.apache.org.apache.org

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


[GitHub] [apisix] jiangfucheng commented on issue #9819: help request: I use enable_compression in log-rotate plugin, but apisix did not delete the original access log

Posted by "jiangfucheng (via GitHub)" <gi...@apache.org>.
jiangfucheng commented on issue #9819:
URL: https://github.com/apache/apisix/issues/9819#issuecomment-1631792593

   https://github.com/apache/apisix/blob/513c05214f6f16f4477cba9925a6074b0795be8a/apisix/plugins/log-rotate.lua#L172-L184
   
   It seems cause by that the log file too large cause compress command timeout and then return immediately, not remove origin file.  Maybe we can increase the `timeout` of `shell.run()` method, I'm not sure if this will lead other issues. Let's listen to the opinions of others.


-- 
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-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] alptugay commented on issue #9819: help request: I use enable_compression in log-rotate plugin, but apisix did not delete the original access log

Posted by "alptugay (via GitHub)" <gi...@apache.org>.
alptugay commented on issue #9819:
URL: https://github.com/apache/apisix/issues/9819#issuecomment-1634114424

   https://github.com/apache/apisix/pull/8620
   I've created a pull request for this but is now stale. It will solve your problem


-- 
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-unsubscribe@apisix.apache.org

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


Re: [I] help request: I use enable_compression in log-rotate plugin, but apisix did not delete the original access log [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek closed issue #9819: help request: I use enable_compression in log-rotate plugin, but apisix did not delete the original access log 
URL: https://github.com/apache/apisix/issues/9819


-- 
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-unsubscribe@apisix.apache.org

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


Re: [I] help request: I use enable_compression in log-rotate plugin, but apisix did not delete the original access log [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #9819:
URL: https://github.com/apache/apisix/issues/9819#issuecomment-1811890344

   fixed by #8620 


-- 
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-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] shreemaan-abhishek commented on issue #9819: help request: I use enable_compression in log-rotate plugin, but apisix did not delete the original access log

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #9819:
URL: https://github.com/apache/apisix/issues/9819#issuecomment-1635725045

   @alptugay we the PR has been reopened, I have left review comments let's get this merged. 🔥 


-- 
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-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] iamacnhero commented on issue #9819: help request: I use enable_compression in log-rotate plugin, but apisix did not delete the original access log

Posted by "iamacnhero (via GitHub)" <gi...@apache.org>.
iamacnhero commented on issue #9819:
URL: https://github.com/apache/apisix/issues/9819#issuecomment-1631891231

   > 
   Indeed, the compression timed out. below is the error.log
   
   
   2023/07/11 00:00:11 [error] 52#52: *45898080 [lua] log-rotate.lua:186: compression_file(): compress log file from 2023-07-11_00-00-00__access.log to 2023-07-11_00-00-00__access.log.tar.gz fail, stdout:  stderr:  reason: failed to wait for process: timeout status: nil, context: ngx.timer
   


-- 
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-unsubscribe@apisix.apache.org

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