Comments (4)
This is exactly what this handler aims to do.
On network errors (like when no listeners running) the events are queued and re-sent later as long as the events could be delivered successfully. Currently there is no backoff logic but it could be implemented.
Did you experience loss of events due to transmission problems?
from python-logstash-async.
problem occured to me when I run this handler while there is no destination listening (immediately)
from python-logstash-async.
here is my sample logging script: https://gist.github.com/jesusch/6283670bbd294a0a16525c01a0253bd3
and here is the console output of running it: https://gist.github.com/jesusch/a7a86083c6ca2cdf0699d7978b172a67
from python-logstash-async.
This is as expected:
the handler tries to send the events and if it fails, the events are queued in the SQLite database.
Every QUEUED_EVENTS_FLUSH_INTERVAL
seconds or every QUEUED_EVENTS_FLUSH_COUNT
events (https://github.com/eht16/python-logstash-async/blob/master/logstash_async/constants.py#L19) resending is tried (the new events as well as the events queued in the database).
You should find the events in the database and they will be re-sent once you restart your test application.
I guess there is just a misunderstanding in the behavior:
the handler will not keep the application running until the events could be delivered successfully. This is out of scope of a logging handler. However the handler performs a last transmission attempt on exit (i.e. if the logging subsystem is shutdown).
from python-logstash-async.
Related Issues (20)
- Log record "extra" fields are missing when using LogstashFormatter HOT 6
- Log level of: "An error occurred while sending events: [Errno 104] Connection reset by peer" HOT 2
- Not working with Django HOT 5
- Crash when logstash server is down (gunicorn with gevent worker) HOT 1
- ImportError: cannot import name 'ParamSpec' from 'typing_extensions' on Python 3.11 HOT 1
- Build pipeline no longer works HOT 1
- Logstash TCP transport errors if not using a client certificate HOT 1
- Sqlite DB not vacuumed HOT 2
- ModuleNotFoundError: No module named 'fcntl' HOT 3
- Broken TCP connection and endless waiting for events from the dark HOT 2
- Makes get_queued_events FIFO or LIFO HOT 1
- Retrieve non flushed event count in sqlite db at start HOT 1
- 2.7.0 doesn't work under Windows HOT 1
- Can cause python code to hang in k8s deployment with python 3.11 HOT 4
- AttributeError: 'MemoryCache' object has no attribute 'get_non_flushed_event_count' HOT 3
- Transport endpoint is not connected HOT 10
- JSON Parse Failure on host Field (could not set field 'ip' on object) HOT 2
- BeatsTransport _batch_size HOT 3
- Improve LogProcessingWorker._fetch_events() performances HOT 2
- Modification to `constants.FORMATTER_RECORD_FIELD_SKIP_LIST` ignored since v3.0.0
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 python-logstash-async.