Logging write can cause OOMs and log spam #922
Labels
api: logging
Issues related to the googleapis/java-logging API.
logging-resilience
priority: p3
Desirable enhancement or fix. May not be included in next release.
status: blocked
Resolving the issue is dependent on other work.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
Details
Due to google/guava#2134 when flushing the logs here:
java-logging/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java
Line 883 in 7f7f488
(which calls Futures.allAsList here)
Causes logs to get flushed again (because a failure causes logging here. So more logs are buffered in memory due to the spam and our tasks OOM. I understand from #33 it is desired to allow tasks to OOM if there are logging failures, but failures in logging should not add fuel to the fire here by adding more log entries.
google/guava#2134 (comment) suggests that the following code should be replaced with:
But since this library is indirectly using Guava Futures,
whenAllSucceed
also needs to be added to ApiFutures first.Stack trace
The text was updated successfully, but these errors were encountered: