Comments (4)
I'm having a very similar issue.
from log4stash.
Can you share your configuration?
I think you can work around this if you ok with loosing few log messages in case of overflow
from log4stash.
I'd be happy with some lost messages right now!
If there isn't a way / plan for a flush-on-payload-size limit feature, that'd be useful. I'm using AWS OpenSearch and we're limited to 10Mb per message. With the settings below as well as some application-level message size capping, we're regularly blowing past that.
<?xml version="1.0" encoding="utf-8"?>
<log4net>
<root>
<level value="ALL" />
<appender-ref ref="elasticsearch" />
</root>
<appender name="elasticsearch" type="log4stash.ElasticSearchAppender, log4stash">
<Server><!-- redacted --></Server>
<Port>443</Port>
<AllowSelfSignedServerCert>False</AllowSelfSignedServerCert>
<Ssl>True</Ssl>
<AuthenticationMethod>
<Basic>
<Username><!-- redacted --></Username>
<Password><!-- redacted --></Password>
</Basic>
</AuthenticationMethod>
<IndexName>%{environment}-%{application}-%{log.level}-%{+yyyy-MM-dd}</IndexName>
<IndexType>_doc</IndexType>
<IndexAsync>False</IndexAsync>
<BulkSize>256</BulkSize><!-- we're getting lots of payload too large messages -->
<BulkIdleTimeout>5000</BulkIdleTimeout>
<DropEventsOverBulkLimit>False</DropEventsOverBulkLimit>
<ElasticSearchTimeout>90000</ElasticSearchTimeout><!-- we're getting connection rejected a lot from the server; I'd like to increase BulkSize, but with the payload too large messages, I don't think I can right now -->
<SerializeObjects>True</SerializeObjects>
<FixedFields>Partial</FixedFields>
<ElasticFilters>
<Remove>
<Key>log4net:HostName</Key>
</Remove>
<Remove>
<Key>log4net:Identity</Key>
</Remove>
<Rename>
<Key>AppDomain</Key>
<RenameTo>application</RenameTo>
</Rename>
<Rename>
<Key>HostName</Key>
<RenameTo>host.name</RenameTo>
</Rename>
<Rename>
<Key>Level</Key>
<RenameTo>log.level</RenameTo>
</Rename>
<Rename>
<Key>log4net:UserName</Key>
<RenameTo>UserName</RenameTo>
</Rename>
<Rename>
<Key>LoggerName</Key>
<RenameTo>log.logger</RenameTo>
</Rename>
<Rename>
<Key>Message</Key>
<RenameTo>message.text</RenameTo>
</Rename>
<Rename>
<Key>ThreadName</Key>
<RenameTo>thread.name</RenameTo>
</Rename>
<Rename>
<Key>UserName</Key>
<RenameTo>server.user.name</RenameTo>
</Rename>
</ElasticFilters>
</appender>
</log4net>
from log4stash.
Hi,
We have a mechanism to drop events over the bulk limit, but you will have to play with it in order to achieve optimal solution.
Please read about DropEventsOverBulkLimit
there: #77 (comment)
Basically you will have to set BulkIdleTimeout
to a more smaller timeout (depends on your amount of log messages per seconds) and set DropEventsOverBulkLimit
to true
from log4stash.
Related Issues (20)
- Aliases for Index
- Using the template returns not data HOT 1
- Custom log4net values get submitted as { "Count": 1 } HOT 2
- Does not work with log4net 2.0.8 or higher HOT 5
- Unable to push logs to https elasticsearch from aspnet core HOT 3
- ConvertToArrayFilter: System.ArgumentNullException: Value cannot be null HOT 10
- Not clear what these properties do HOT 1
- log4stash v3.0.0 doesn't work with ElasticSearch 6.x HOT 1
- Log4Stash logging metadata info by itself HOT 2
- AWS Signature failure - Incorrect HOST header? HOT 1
- log4stash does not have Http compression for ES?
- Target Elasticsearch index is incorrect HOT 3
- Authentication configuration does not feel compatible with "log4net >= 2.0.8" HOT 2
- Allowing self signed certs does not work (AllowSelfSignedServerCert) HOT 1
- Unobserved task exception in ASP.NET Web API project when using IndexAsync and BulkSize is reached during request
- In PrepareBulk: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
- Can't set authentication method v3.0.4 HOT 4
- IndexOperationParams from example is not working HOT 1
- How to use it on .Net 6? HOT 1
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 log4stash.