The services now run on Java 17, with a periodic G1 GC that returns unused
heap to the OS when idle. Previously Java 11 kept the committed heap, so
events-processors held 5.5 GB while its live data was ~250 MB.
All RocksDB state stores now share one bounded block cache and write buffer
(ROCKSDB_TOTAL_MEMORY_MB, default 256 MB), instead of each of the ~45 stores
having its own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The syslog parser reuses its result map for each line it parses, and
SyslogMsg kept a reference to that map instead of a copy. The producer
consumes messages concurrently with the reader, so by the time a message
was checked, its map had sometimes already been overwritten by the next
line; the message then failed the 'KafkatorioPacket:::' filter and was
dropped without any log. Under real load (bursts of map chunk packets)
most packets were lost.
Copy the parsed map, and log Kafka producer send failures instead of
ignoring them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a client closed its connection, handleConnection threw on the
null line, closed the socket, and then logged socket.description() -
which reads the address of the now-closed socket and throws
ClosedChannelException. That escaped the handler and crashed the
whole server, dropping every other client's connection. With the
Docker syslog log driver in non-blocking mode, the Factorio server's
logs were then silently discarded, so most packets never arrived.
Treat a null line as a normal client disconnect, capture the socket
description while it's still open, and always close the socket in
'finally', so one connection can't take down the server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>