# Logstash is reading whole log file every time it updates

**URL:** <https://discuss.elastic.co/t/logstash-is-reading-whole-log-file-every-time-it-updates/172684>\
**Category:** Elasticsearch\
**Created:** [March 17, 2019, 2:29pm UTC](https://discuss.elastic.co/t/logstash-is-reading-whole-log-file-every-time-it-updates/172684 "2019-03-17T14:29:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luke14](https://avatars.discourse-cdn.com/v4/letter/l/65b543/32.png) [@luke14](https://discuss.elastic.co/u/luke14)\
**Post date:** [March 17, 2019, 2:29pm UTC](https://discuss.elastic.co/t/logstash-is-reading-whole-log-file-every-time-it-updates/172684/1 "2019-03-17T14:29:06Z")

</div>

Hi

Every time a new log line is added to my log file, logstash is re-parsing my whole log file and sending it to elasticsearch. I have no idea why this is happening? Any ideas?

I have not set

```
sincedb_path => "/dev/null"

```

My logfile is being sent via filebeat to logstash.

Thanks

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 17, 2019, 2:46pm UTC](https://discuss.elastic.co/t/logstash-is-reading-whole-log-file-every-time-it-updates/172684/2 "2019-03-17T14:46:48Z")

</div>

Exactly how is data being added to the log file? Make sure it is appended without changing the inode. If you are adding data e.g. through an editor a new file with the same name is typically generated for each save.

---

<div class="post-metadata">

**Author:** ![luke14](https://avatars.discourse-cdn.com/v4/letter/l/65b543/32.png) [@luke14](https://discuss.elastic.co/u/luke14)\
**Post date:** [March 18, 2019, 9:18am UTC](https://discuss.elastic.co/t/logstash-is-reading-whole-log-file-every-time-it-updates/172684/3 "2019-03-18T09:18:44Z")

</div>

Hi,

Thanks for the reply. It seemed as though it was permission issue with the log file. Changing to read/write permissions seems to fix the issue.

Thanks

---

<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:** [April 15, 2019, 9:18am UTC](https://discuss.elastic.co/t/logstash-is-reading-whole-log-file-every-time-it-updates/172684/4 "2019-04-15T09:18:47Z")

</div>

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