Kafka Java heap space - OutOfMemoryError

exaucaea year ago

Just added Kafka event forwad url & topic. When restarting traccar, it yields Java heap space - OutOfMemoryError. Is this something expected? If so, what's the expected size from traccar kafka producer?

Here are the logs:


2023-05-25 17:18:17  INFO: [Producer clientId=producer-1] Instantiated an idempotent producer.
136
2023-05-25 17:18:17  INFO: Kafka version: 3.4.0
135
2023-05-25 17:18:17  INFO: Kafka commitId: 2e1947d240607d53
134
2023-05-25 17:18:17  INFO: Kafka startTimeMs: 1685035097803
133
2023-05-25 17:18:18  INFO: jetty-10.0.15; built: 2023-04-11T17:25:14.480Z; git: 68017dbd00236bb7e187330d7585a059610f661d; jvm 11.0.18+10-alpine-r0
132
2023-05-25 17:18:18  INFO: Started o.t.w.@382faf51{/,null,AVAILABLE}
131
2023-05-25 17:18:18  INFO: Session workerName=node0
130
2023-05-25 17:18:18 ERROR: Uncaught exception in thread 'kafka-producer-network-thread | producer-1': - Java heap space - OutOfMemoryError (...)

Anton Tananaeva year ago

It sounds like you should add more memory for Traccar.

exaucaea year ago

Well that's what I guessed. 3Gi wasn't enough to get rid of the error. Hence my asking for the correct threshold, if any.
Perpjhaps the error isn't at all related to heap, and hides another. I'd explore this too

exaucaea year ago

Small update on this. The error wasn't due to memory. SSL was the root cause, as depicted in these Kafka tickets