Comments (3)
@tkowalcz Thanks a lot for the explanation. Sorry for the late reply, took a while to test. It's working as expected now. Closing the ticket. Thanks again :)
from tjahzi.
Hi,
TL;DR: set useOffHeapBuffer=false
config option so that data structures used by Tjahzi will be allocated on regular Java heap instead of off-heap.
I am not very versed in Docker usage, but according to your output I think this is what happens:
- You have 18761956K (~18GB) of available memory.
- JVM old gen will take 18103971K (17,2GB) out of it.
- Metaspace and code cache will take ~382MB
- Thread stacks (
-Xss1M
) will take 250MB (Thread Count: 250
* 1M)
If I am correct this totals to 18751715K so the container has about 10MB of free memory.
This lines up nicely with -XX:MaxDirectMemorySize=10M
setting that allows the java app to allocate at most 10M of
off-heap data.
To fix this you need to increase MaxDirectMemorySize
while decreasing other settings OR set Tjahzi to allocate less than 10M of off-heap data.
Let me elaborate on that last option. While configuring Tjahzi you can set useOffHeapBuffer=false
so that data structures used by Tjahzi will be part of a regular Java heap. I do not expect that this would have significant performance impact on the application.
You can also set bufferSizeMegabytes
to value lower than 10M from its default value of 32M. This can impact log delivery if Tjahzi cannot keep up sending data to Loki while application produices the logs into the buffer.
from tjahzi.
@akhilvpsharma doe this explanation help and fixes the issue or do you need any more assistance?
from tjahzi.
Related Issues (20)
- Consider revert to an open source license HOT 4
- Debugging tips when appenders are waiting? (log4j) HOT 2
- Improve the ability to debug connection problems
- Is log4j2-appender-nodep / log4j2-appender incompatible with JDK 8? HOT 7
- Option for log shipper thread to be a daemon thread
- Dropping Log lines when logBuffer.tryClaim fails to get positive claim value HOT 1
- Logger and thread name labels for logback appender. HOT 1
- Is it possible to use this appender with a json layout? HOT 3
- What is the problem? HOT 4
- SNI does not seem to be sent in SSL Client Hello packet HOT 2
- [log4j2-appender-nodep] CVE-2022-41881 due to Netty 4.1.77.Final HOT 3
- [log4j2-appender] Basic authentication with self-hosting Loki not working HOT 1
- java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled HOT 2
- Create log4j (1) appender
- java.lang.NoSuchMethodError: pl.tkowalcz.tjahzi.log4j2.LokiAppenderBuilder.getConfiguration() - Unable to Resolve HOT 10
- Appender OutOf Memory Error for MuleSoft Apps HOT 2
- Exception: AtomicBuffer is not correctly aligned HOT 6
- Support structured_metadata HOT 1
- Upgrade tests to use Loki 3.1.0
- Spark applications using the Loki appender hang at shutdown HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tjahzi.