Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Compression in log-rotate plugin exceeds the default timeout of shell.run #8619

Closed
alptugay opened this issue Jan 5, 2023 · 0 comments · Fixed by #8620
Closed

bug: Compression in log-rotate plugin exceeds the default timeout of shell.run #8619

alptugay opened this issue Jan 5, 2023 · 0 comments · Fixed by #8620

Comments

@alptugay
Copy link
Contributor

alptugay commented Jan 5, 2023

Current Behavior

When rotating log files, the log-rotate plugin uses shell.run() function which has a default timeout of 10 seconds. When rotating big log files this timeout is exceeded thus the tar command is being killed with SIGTERM. This causes the rotated files to be incomplete, and also the log files doesn't get removed.

image

Expected Behavior

Logs should be rotated completely unless it takes more time than log rotate interval. Therefor the timeout of the shell.run() function should be the same as the interval value.

Error Logs

No response

Steps to Reproduce

Generate a log file (1GB or more) which takes more than 10 seconds to compress using tar -cvf
Let the log rotate plugin work

Environment

  • APISIX 2.15 but should be the same on v3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant