I guess I misstyped, files are 200-400 MB, not GB.. if i leave auto_flush to default, it just puts plenty of documents instead of one in index, probably because it's flushing before it reached the end of file..
[user@host]$ wc -l file1.error.0
5648964 file1.error.0
[user@host]$ ls -l
total 434616
-rwxr-xr-x. 1 user group 222522407 Sep 18 00:41 file1.error.0
-rwxr-xr-x. 1 uerr group 222521798 Sep 18 00:41 file2.error.0
increased auto-flush to 20, but it still runs "forever", probably because over 5 million lines..
21-09-19T19:51:12,539][TRACE][filewatch.tailmode.processor] Watched processing
[2021-09-19T19:51:12,540][TRACE][filewatch.tailmode.processor] Active - no change {"watched_file"=>"<FileWatch::WatchedFile: @filename='file1.error.0', @state='active', @recent_states='[:watched, :watched]', @bytes_read='222521798', @bytes_unread='0', current_size='222521798', last_stat_size='222521798', file_open?='true', @initial=false, @sincedb_key='8915917 0 64768'>"}
[709.571s][info ][gc,start ] GC(3735) Pause Young (Allocation Failure)
[709.572s][info ][gc,task ] GC(3735) Using 23 workers of 23 for evacuation
[709.586s][info ][gc,heap ] GC(3735) ParNew: 1735294K->170249K(1763584K)
[709.586s][info ][gc,heap ] GC(3735) CMS: 2404834K->2404834K(14817728K)
[709.586s][info ][gc,metaspace ] GC(3735) Metaspace: 93132K->93132K(1140736K)
[709.586s][info ][gc ] GC(3735) Pause Young (Allocation Failure) 4043M->2514M(16192M) 14.566ms
[709.586s][info ][gc,cpu ] GC(3735) User=0.29s Sys=0.01s Real=0.01s
[709.700s][info ][gc,start ] GC(3736) Pause Young (Allocation Failure)
[709.700s][info ][gc,task ] GC(3736) Using 23 workers of 23 for evacuation
[709.715s][info ][gc,heap ] GC(3736) ParNew: 1734238K->165368K(1763584K)
[709.715s][info ][gc,heap ] GC(3736) CMS: 2404834K->2404836K(14817728K)
[709.715s][info ][gc,metaspace ] GC(3736) Metaspace: 93132K->93132K(1140736K)
[709.715s][info ][gc ] GC(3736) Pause Young (Allocation Failure) 4042M->2509M(16192M) 14.642ms
[709.715s][info ][gc,cpu ] GC(3736) User=0.29s Sys=0.00s Real=0.02s
[709.829s][info ][gc,start ] GC(3737) Pause Young (Allocation Failure)
[709.829s][info ][gc,task ] GC(3737) Using 23 workers of 23 for evacuation
[709.851s][info ][gc,heap ] GC(3737) ParNew: 1730631K->168343K(1763584K)
[709.851s][info ][gc,heap ] GC(3737) CMS: 2404836K->2404837K(14817728K)
[709.851s][info ][gc,metaspace ] GC(3737) Metaspace: 93132K->93132K(1140736K)
[709.851s][info ][gc ] GC(3737) Pause Young (Allocation Failure) 4038M->2512M(16192M) 21.583ms
[709.851s][info ][gc,cpu ] GC(3737) User=0.26s Sys=0.10s Real=0.02s
[709.967s][info ][gc,start ] GC(3738) Pause Young (Allocation Failure)
[709.967s][info ][gc,task ] GC(3738) Using 23 workers of 23 for evacuation
[709.982s][info ][gc,heap ] GC(3738) ParNew: 1734121K->169792K(1763584K)
[709.982s][info ][gc,heap ] GC(3738) CMS: 2404837K->2404837K(14817728K)
[709.982s][info ][gc,metaspace ] GC(3738) Metaspace: 93132K->93132K(1140736K)
[709.982s][info ][gc ] GC(3738) Pause Young (Allocation Failure) 4041M->2514M(16192M) 15.107ms
[709.982s][info ][gc,cpu ] GC(3738) User=0.27s Sys=0.04s Real=0.02s
[710.099s][info ][gc,start ] GC(3739) Pause Young (Allocation Failure)
[710.099s][info ][gc,task ] GC(3739) Using 23 workers of 23 for evacuation
[710.115s][info ][gc,heap ] GC(3739) ParNew: 1736629K->161248K(1763584K)
[710.115s][info ][gc,heap ] GC(3739) CMS: 2404837K->2404837K(14817728K)
[710.115s][info ][gc,metaspace ] GC(3739) Metaspace: 93132K->93132K(1140736K)
[710.115s][info ][gc ] GC(3739) Pause Young (Allocation Failure) 4044M->2505M(16192M) 16.103ms
[710.115s][info ][gc,cpu ] GC(3739) User=0.28s Sys=0.01s Real=0.02s
some more gc logs