Logstash Shutiing Down

i'm new to ELK
i have a folder contient json files and i'm using logstash for indexing
sometimes i get this error

[2022-11-24T11:08:58,748][WARN ][logstash.runner          ] SIGINT received. Shutting down.
[2022-11-24T11:08:58,765][FATAL][org.logstash.Logstash    ]
java.lang.OutOfMemoryError: Java heap space
        at java.lang.String.<init>(java/lang/String.java:3222) ~[?:?]
        at java.lang.String.<init>(java/lang/String.java:276) ~[?:?]
        at java.nio.HeapCharBuffer.toString(java/nio/HeapCharBuffer.java:620) ~[?:?]
        at java.nio.CharBuffer.toString(java/nio/CharBuffer.java:1428) ~[?:?]
        at org.jruby.RubyEncoding.decodeUTF8(org/jruby/RubyEncoding.java:297) ~[jruby-complete-9.2.19.0.jar:?]
        at org.jruby.RubyString.decodeString(org/jruby/RubyString.java:802) ~[jruby-complete-9.2.19.0.jar:?]
        at org.jruby.RubyString.toJava(org/jruby/RubyString.java:6393) ~[jruby-complete-9.2.19.0.jar:?]
        at org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:925) ~[jruby-complete-9.2.19.0.jar:?]
        at org.jruby.RubyClass$INVOKER$i$newInstance.call(org/jruby/RubyClass$INVOKER$i$newInstance.gen) ~[jruby-complete-9.2.19.0.jar:?]
        at java.lang.invoke.LambdaForm$DMH/0x00000008007afc40.invokeVirtual(java/lang/invoke/LambdaForm$DMH) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x00000008007b1c40.invoke(java/lang/invoke/LambdaForm$MH) ~[?:?]
        at java.lang.invoke.DelegatingMethodHandle$Holder.delegate(java/lang/invoke/DelegatingMethodHandle$Holder) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x00000008007af440.guard(java/lang/invoke/LambdaForm$MH) ~[?:?]
        at java.lang.invoke.DelegatingMethodHandle$Holder.delegate(java/lang/invoke/DelegatingMethodHandle$Holder) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x00000008007af440.guard(java/lang/invoke/LambdaForm$MH) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x00000008007ae440.linkToCallSite(java/lang/invoke/LambdaForm$MH) ~[?:?]
        at usr.share.logstash.vendor.bundle.jruby.$2_dot_5_dot_0.gems.manticore_minus_0_dot_7_dot_1_minus_java.lib.manticore.client.request_from_options(/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/manticore-0.7.1-java/lib/manticore/client.rb:479) ~[?:?]
        at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java/lang/invoke/DirectMethodHandle$Holder) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x0000000800835040.invoke(java/lang/invoke/LambdaForm$MH) ~[?:?]
        at java.lang.invoke.DelegatingMethodHandle$Holder.delegate(java/lang/invoke/DelegatingMethodHandle$Holder) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x00000008007a6c40.guard(java/lang/invoke/LambdaForm$MH) ~[?:?]
        at java.lang.invoke.DelegatingMethodHandle$Holder.delegate(java/lang/invoke/DelegatingMethodHandle$Holder) ~[?:?]
        at java.lang.invoke.LambdaForm$MH/0x00000008007a6c40.guard(java/lang/invoke/LambdaForm$MH) ~[?:?]
[2022-11-24T11:08:58,923][ERROR][filewatch.readmode.handlers.readfile][circl][0ab883a209bbb977902b0e0077fab5af1ada4a33b1d57120c623ca702d66ba3d] controlled_read: general error reading file {:path=>"/etc/logstash/conf.d/circl/56b06c17-0b4c-4a9d-b71b-43f3950d210f.json", :exception=>IOError, :message=>"closed stream", :backtrace=>["org/jruby/RubyIO.java:2987:in `sysread'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/watched_file.rb:229:in `file_read'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/watched_file.rb:241:in `read_extract_lines'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/read_mode/handlers/read_file.rb:40:in `block in controlled_read'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/read_mode/handlers/read_file.rb:37:in `controlled_read'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/read_mode/handlers/read_file.rb:11:in `block in handle_specifically'", "org/jruby/RubyKernel.java:1442:in `loop'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-file-4.4.0/lib/filewatch/read_mode/handlers/read_file.rb:8:in `handle_specifically'"]}
[2022-11-24T11:08:58,819][INFO ][filewatch.observingread  ][circl] QUIT - closing all files and shutting down.

how to solve this error and what that means

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