Bot Not Responding To Commands After Some Time But Still Running

Java Version: 1.8.0_141-b16
OS Version: Linux 4.9.38-16.33.amzn1.x86_64 (amd64)
Panel Version: 1.0.0
PhantomBot Version: 3.0.0 (Revision: fcc08b51)

Let us know what help you need:
After some time the bot stops responding to commands. This has been happening quite a bit after running for a while and I have to manually restart it. It is still running fine when ssh into the linux machine and responds to some console commands like botinfo. It is currently in that state so I’m hoping someone will be able to help debug this issue.

If a feature is not working, please provide console output, output from chat, logs, some sort of additional information to help us troubleshoot and provide assistance as needed:

Some errors I saw:
In stacktraces:

[10-20-2019 @ 05:58:20.397 GMT] java.lang.ArrayIndexOutOfBoundsException: 1
at tv.phantombot.twitch.irc.TwitchWSIRCParser.parseLine(TwitchWSIRCParser.java:270)
at tv.phantombot.twitch.irc.TwitchWSIRCParser.parseData(TwitchWSIRCParser.java:150)
at tv.phantombot.twitch.irc.TwitchWSIRC$1.run(TwitchWSIRC.java:190)
at java.lang.Thread.run(Thread.java:748)

[10-20-2019 @ 08:16:16.344 GMT] java.lang.ArrayIndexOutOfBoundsException

[10-20-2019 @ 09:54:56.788 GMT] java.lang.ArrayIndexOutOfBoundsException

[10-20-2019 @ 12:40:07.325 GMT] java.lang.ArrayIndexOutOfBoundsException

[10-20-2019 @ 13:01:47.637 GMT] java.lang.ArrayIndexOutOfBoundsException

[10-20-2019 @ 15:47:48.556 GMT] java.lang.ArrayIndexOutOfBoundsException

In core-error

[10-20-2019 @ 18:37:21.064 GMT] java.io.FileNotFoundException: ./web/index.php (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at tv.phantombot.httpserver.HTTPServerCommon.handleFile(HTTPServerCommon.java:543)
at tv.phantombot.httpserver.HTTPServerCommon.handle(HTTPServerCommon.java:210)
at tv.phantombot.httpserver.HTTPServer$HTTPServerHandler.handle(HTTPServer.java:104)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:158)
at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:431)
at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:396)
at java.lang.Thread.run(Thread.java:748)

[10-20-2019 @ 18:45:18.778 GMT] [handleFile()@HTTPServerCommon.java:552] HTTP Server: handleFile(): ./web/en/homepage (No such file or directory)

[10-20-2019 @ 18:45:18.781 GMT] java.io.FileNotFoundException: ./web/en/homepage (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at tv.phantombot.httpserver.HTTPServerCommon.handleFile(HTTPServerCommon.java:543)
at tv.phantombot.httpserver.HTTPServerCommon.handle(HTTPServerCommon.java:210)
at tv.phantombot.httpserver.HTTPServer$HTTPServerHandler.handle(HTTPServer.java:104)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:158)
at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:431)
at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:396)
at java.lang.Thread.run(Thread.java:748)

(a bunch of other ones here as well)

[10-20-2019 @ 18:37:20.798 GMT] [ERROR] [handleFile()@HTTPServerCommon.java:552] HTTP Server: handleFile(): ./web/TP/public/index.php (No such file or directory)
[10-20-2019 @ 18:37:20.837 GMT] [ERROR] [handleFile()@HTTPServerCommon.java:552] HTTP Server: handleFile(): ./web/TP/index.php (No such file or directory)
[10-20-2019 @ 18:37:20.874 GMT] [ERROR] [handleFile()@HTTPServerCommon.java:552] HTTP Server: handleFile(): ./web/thinkphp/html/public/index.php (No such file or directory)
[10-20-2019 @ 18:37:20.913 GMT] [ERROR] [handleFile()@HTTPServerCommon.java:552] HTTP Server: handleFile(): ./web/html/public/index.php (No such file or directory)
[10-20-2019 @ 18:37:20.952 GMT] [ERROR] [handleFile()@HTTPServerCommon.java:552] HTTP Server: handleFile(): ./web/public/index.php (No such file or directory)
[10-20-2019 @ 18:37:20.989 GMT] [ERROR] [handleFile()@HTTPServerCommon.java:552] HTTP Server: handleFile(): ./web/TP/html/public/index.php (No such file or directory)
[10-20-2019 @ 18:37:21.025 GMT] [ERROR] [handleFile()@HTTPServerCommon.java:552] HTTP Server: handleFile(): ./web/elrekt.php (No such file or directory)
[10-20-2019 @ 18:37:21.064 GMT] [ERROR] [handleFile()@HTTPServerCommon.java:552] HTTP Server: handleFile(): ./web/index.php (No such file or directory)

When running commands in debug mode:

[10-20-2019 @ 18:52:08.321 GMT] [CONSOLE] Executing debugon: Enable Debug Mode
[10-20-2019 @ 18:52:08.321 GMT] Debug Mode Enabled
[10-20-2019 @ 18:52:08.322 GMT] [DEBUG] [onEvent()@ScriptEventManager.java:77] Dispatched event ConsoleInputEvent
uptime
[10-20-2019 @ 18:52:14.861 GMT] [DEBUG] [onEvent()@ScriptEventManager.java:77] Dispatched event ConsoleInputEvent
[10-20-2019 @ 18:52:14.865 GMT] [DEBUG] [onEvent()@ScriptEventManager.java:77] Dispatched event CommandEvent
[10-20-2019 @ 18:52:27.916 GMT] [DEBUG] [lambda$onOpen$0()@TwitchWSIRC.java:131] Sending a PING to Twitch.
[10-20-2019 @ 18:52:31.443 GMT] [DEBUG] [updateCache()@FollowersCache.java:113] FollowersCache::updateCache
[10-20-2019 @ 18:52:33.129 GMT] [DEBUG] [updateCache()@DonationsCache.java:129] DonationsCache::updateCache
[10-20-2019 @ 18:52:35.370 GMT] [DEBUG] [updateCache()@TwitchCache.java:245] TwitchCache::updateCache
[10-20-2019 @ 18:54:45.700 GMT] [DEBUG] [onPrivMsg()@TwitchWSIRCParser.java:389] IRCv3 Tags: {user-type=mod, tmi-sent-ts=1571597685543, mod=1, subscriber=1, color=#28D9FF, turbo=0, user-id=393153, flags=, badges=moderator/1,subscriber/36,bits-charity/1, room-id=83402203, display-name=EmptyM, emotes=, id=8e4552e3-49c3-4a9d-b7c5-cdfa15ecb576}
[10-20-2019 @ 18:54:45.716 GMT] [DEBUG] [onEvent()@ScriptEventManager.java:77] Dispatched event IrcPrivateMessageEvent

I think we fixed this in the nightly build

What commit is the fix?
I’d be interested in seeing what the issue was and maybe just fixing that issue in our bot instead of using a nightly build.

Not completely sure. I think it may have been all commits to tv.phantombot.twitch.irc.TwitchSession, tv.phantombot.twitch.irc.TwitchWSIRC, and tv.phantombot.twitch.irc.TwitchWSIRCParser from July 19 onward combined