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

com.google.cloud.logging.logback.LoggingAppender flush is too slow #133

Closed
kunieda-o opened this issue Jul 8, 2020 · 6 comments · Fixed by #319
Closed

com.google.cloud.logging.logback.LoggingAppender flush is too slow #133

kunieda-o opened this issue Jul 8, 2020 · 6 comments · Fixed by #319
Assignees
Labels
api: logging Issues related to the googleapis/java-logging-logback API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue.

Comments

@kunieda-o
Copy link

I have a project running Java in an app engine which uses com.google.cloud.logging.logback.LoggingAppender to output log like as below.

https://cloud.google.com/logging/docs/setup/java

I found that the latency of log.error output is around 100ms. This means, if the app output error logs too many then app-engine would scale up.

Our app connect to some external services. When those services sometimes respond error, the app output error logs.

Does anyone know how to cope with it?

I expected that flushLevel=OFF would resolve this issue, but OFF=ALL by below method. https://github.com/googleapis/java-logging-logback/blob/0.116.0/google-cloud-contrib/google-cloud-logging-logback/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java#L336-L355

Sorry for my multi post.

https://stackoverflow.com/questions/62786760/q-gae-stackdriver-java-logback-error-logging-too-slow

I contacted Google Support Case and they told me to create an issue about this case.

@suraj-qlogic suraj-qlogic self-assigned this Jul 8, 2020
@suraj-qlogic suraj-qlogic transferred this issue from googleapis/google-cloud-java Jul 8, 2020
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/java-logging-logback API. label Jul 8, 2020
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Jul 9, 2020
@simonz130 simonz130 added priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Jul 14, 2020
@simonz130
Copy link

I don't see anything in code where the code behaves differently when we log errors with regular messages.
Can you confirm whether the issue with flush is happening when you log to stderr or also when you log to stdout?
Also, it would be great if you could share a simple repro so we can try to reproduce it faster.

@simonz130 simonz130 self-assigned this Jul 21, 2020
@kunieda-o
Copy link
Author

@simonz130 Thank you for your response.
I'll create the reproducer.
For now, I haven't yet checked when log to stderr or stdout.

@suraj-qlogic suraj-qlogic removed their assignment Aug 21, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Nov 19, 2020
@kunieda-o
Copy link
Author

@simonz130
I created the reproducer.
Could you please have a look at it?

https://github.com/kunieda-o/log-flush-too-slow

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Jan 4, 2021
@daniel-sanche
Copy link
Contributor

Thanks for the detailed issue report. I agree that flush level OFF should turn off all auto-flushing. I opened a PR to address this here: #319

@daniel-sanche
Copy link
Contributor

This issue should now be fixed, but I'll keep this open until it is released to be safe

@daniel-sanche
Copy link
Contributor

I just tested with the new version and confirmed it works as expected on 0.120.0-alpha. Closing this now, but let me know if you want to continue the discussion

@minherz minherz removed the 🚨 This issue needs some love. label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging-logback API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants