# "File" fail to read a file (sometimes)

**URL:** <https://discuss.elastic.co/t/file-fail-to-read-a-file-sometimes/53204>\
**Category:** Logstash\
**Created:** [June 18, 2016, 7:16am UTC](https://discuss.elastic.co/t/file-fail-to-read-a-file-sometimes/53204 "2016-06-18T07:16:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Magic](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Magic](https://discuss.elastic.co/u/Magic)\
**Post date:** [June 18, 2016, 7:16am UTC](https://discuss.elastic.co/t/file-fail-to-read-a-file-sometimes/53204/1 "2016-06-18T07:16:05Z")

</div>

Hi,

My platform is windows and I fail to process some big (actually not so big) file with file input plugin.  
Below is my file input configuration segment:

> ```
> input {
> file {
> path => ["d:/X/zzzzz.csv"]
> codec => plain { charset => "Big5" }
> start_position => "beginning"
> }
> }
> 
> ```

The testing procedure is:

1. I start logstash --verbose (without zzzzz.csv in place), I can see:

> ```
> Registering file input {:path=>["d:/X/zzzzz.csv"], :level=>:info}
> No sincedb_path set, generating one based on the file path {:sincedb_path=>"C:\\Users\\Magic/.sincedb_535b3b2cc5d2faa77fadaff61b536b79", :path=>[
> "d:/X/zzzzz.csv"], :level=>:info}
> 
> ```

1. I copy a zzzzz.csv (130000 lines, ~8MB) to the place, nothing happened  
sincedb file is not created, either.
2. I close logstash and sincedb file appear (without any content)
3. I start logstash again (zzzzz.csv is in place and sincedb file is blank), nothing happen again.
4. I close logstash again, and sincedb file content become " 0 0 0" (no file identifier!!)

The situation happen usually ( **but not always** ) on my computer especially with big files.  
No matter I put data file before logstash start or copy it to the place for logstash to discovery.

Does anyone encounter this situation?  
Does file input plugin has any limitation?  
(But actually I successfully processed this 8MB file maybe 1 or 2 times....)

Update:  
If I reduce the file to 4MB (70000 lines), it can be processed successfully every time.

---

<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:** [July 6, 2017, 4:52am UTC](https://discuss.elastic.co/t/file-fail-to-read-a-file-sometimes/53204/2 "2017-07-06T04:52:05Z")

</div>


