Splunk Dev

Java heap space

mocquax
Engager

Dear Splunk,

2012-03-21 15:54:51,020 0 [main] ERROR com.splunk.jdbcscriptedinput.Main - java.lang.OutOfMemoryError: Java heap space
2012-03-21 16:34:32,108 0 [main] INFO com.splunk.jdbcscriptedinput.QueryRunner - Retrieved and printed 1226776 rows.
2012-03-21 16:35:32,111 60003 [main] INFO com.splunk.jdbcscriptedinput.QueryRunner - Time expired. Ending query loop.

Do you know how to increase the limit of this Java heap space ?

Thanks

Tags (1)
0 Karma

Damien_Dallimor
Ultra Champion

As per Brian's suggestion :

If it is this app you are referring to :

  • open splunkjdbcscriptedinput\bin\run.sh
  • after the "java" command paste in the JVM heap settings

    java -Xmx256m -Xms512m -cp .:lib/* com.splunk.jdbcscriptedinput.Main $QUERY_NAME/query.properties $QUERY_NAME/query.pointer 2> $LOG_PATH

You can use larger heap memory sizes depending on your JVM architecture(32/64 bit)

Brian_Osburn
Builder

Uh, need more information.

What app is this? Usually for java you can look for the "java -Xmx256m -Xms512m" line which sets the max (mx) and min (ms) memory used.

Brian

Brian_Osburn
Builder

I'm not familiar with this script, so I couldn't really tell you where to modify it.

Is this a Splunk provided script? Or part of an app?

0 Karma

mocquax
Engager

Actually this the jdbc scripted input. Where can i add this sentence named "java -Xmx256m -Xms512m"? run.sh script ?

Thanks

Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...