Recently we have encountered Memory problems running Websphere wsadmin based scripts.
We were trying to retrieve large amount of CBE events from WESB using eventquery.bat script and default 256K memory settings were easily exhausted.
Our first option was to find in wsadmin.bat the line shown below and increase it
set PERFJAVAOPTION=-Xms256m -Xmx256m -Xj9 -Xquickstart
But of course we wanted somewhat more elegant solution and came by the following IBM Tech Note, with the ‘javaoption’ parameter described:
Instead of modyfing wsadmin.bat file passing ‘javaoption’ parameters worked perfectly
wsadmin.bat -javaoption –Xms256m -javaoption –Xmx768m .. rest of parameters…
or in event query case:
eventquery.bat -javaoption –Xms256m -javaoption –Xmx768m .. rest of parameters…