# Logstash locks the log file

**URL:** <https://discuss.elastic.co/t/logstash-locks-the-log-file/66077>\
**Category:** Logstash\
**Created:** [November 15, 2016, 9:04am UTC](https://discuss.elastic.co/t/logstash-locks-the-log-file/66077 "2016-11-15T09:04:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VijayKarthikeyan](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@VijayKarthikeyan](https://discuss.elastic.co/u/VijayKarthikeyan)\
**Post date:** [November 15, 2016, 9:04am UTC](https://discuss.elastic.co/t/logstash-locks-the-log-file/66077/1 "2016-11-15T09:04:40Z")

</div>

Hi,

I am stashing the log files of database to elasticsearch using Logstash.

When I try to stash the log files, logstash reads the file to process the lines. While reading, logstash locks the file and it does not allow others to make any changes to the content.

Even after all the log lines are read and there are no more lines to read, the file is still locked for logstash and I could not do any changes to the content or add more lines to it.

I can only make changes, when I forcefully stop the service of logstash. Can anyone give me a solution for this issue?

Thanks,  
Vijay

---

<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:** [December 13, 2016, 9:04am UTC](https://discuss.elastic.co/t/logstash-locks-the-log-file/66077/2 "2016-12-13T09:04:44Z")

</div>

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