Thanks for reply. I have solved this issue by specifying the option close_eof: true and setting scan_frequency to 10s. Now whenever my application tries to rotate logs there is no read lock on file and it is rotated successfully. 
Thanks for reply. I have solved this issue by specifying the option close_eof: true and setting scan_frequency to 10s. Now whenever my application tries to rotate logs there is no read lock on file and it is rotated successfully. 
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.