# When application's losing logsash connection

**URL:** <https://discuss.elastic.co/t/when-applications-losing-logsash-connection/168789>\
**Category:** Logstash\
**Created:** [February 18, 2019, 9:07am UTC](https://discuss.elastic.co/t/when-applications-losing-logsash-connection/168789 "2019-02-18T09:07:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shwesinhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shwesinhan/32/78663_2.png) [@shwesinhan](https://discuss.elastic.co/u/shwesinhan)\
**Post date:** [February 18, 2019, 9:07am UTC](https://discuss.elastic.co/t/when-applications-losing-logsash-connection/168789/1 "2019-02-18T09:07:50Z")

</div>

hi there

let me subscribe my scenario first.  
i ship app logs using log4net SocketAppender via TCP to logstash svc.  
here, sometimes i need to restart logstash service if my config has some changes.  
in that time, application losing logstash connection once logstash svc restart.

my question is that how to keep application logs while logstash svc restarting...  
and how to get auto connection after logstash svc restarting.

is that possible?

any idea would be appreciated.

---

<div class="post-metadata">

**Author:** ![pjanzen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pjanzen/32/13756_2.png) [@pjanzen](https://discuss.elastic.co/u/pjanzen)\
**Post date:** [February 18, 2019, 12:24pm UTC](https://discuss.elastic.co/t/when-applications-losing-logsash-connection/168789/2 "2019-02-18T12:24:37Z")

</div>

Hi,

In you application you need to make sure you test your connection on a regular basis. According to [the log4net-socket-appender git (do not know if this is the orginal soure)](https://github.com/ugurozsahin/log4net-socket-appender) you can specify such settings...

Paul.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 18, 2019, 12:24pm UTC](https://discuss.elastic.co/t/when-applications-losing-logsash-connection/168789/3 "2019-03-18T12:24:42Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
