This message was deleted.
# troubleshooting
s
This message was deleted.
g
A few ideas 1) You can raise your direct memory limit for tasks by adjusting
-XX:MaxDirectMemorySize
in
druid.indexer.runner.javaOpts
in
middleManager/runtime.properties
(whichever conf directory you're using) 2) you can use the new
bin/start-druid
script in Druid 25+ which sizes direct memory automatically; it may be a better fit for you 3) if you're using native batch ingestion, you can use SQL-based ingestion (https://druid.apache.org/docs/latest/multi-stage-query/index.html) which has greatly improved memory management and is less likely to run into various kinds of OutOfMemoryErrors
s
Thanks, after doing the change you mentioned in point (1), I will have to restart druid?
g
yep you would
s
ack, thanks
Hi, what is the default value of
-XX:MaxDirectMemorySize
when we are not passing any value?
g
if you're using the
bin/start-druid
script it's set automatically to a reasonable value
you can see it in the messages printed when the script starts, like:
Copy code
[Mon Apr  3 14:20:49 2023] Running command[router]: bin/run-druid router /Users/gian/Documents/implytesting/apache-druid-26.0.0-SNAPSHOT/conf/druid/auto '-Xms256m -Xmx256m -XX:MaxDirectMemorySize=128m'
if you're not using
bin/start-druid
then default is same as
-Xmx
(this is a JVM thing)