Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
java.lang.OutOfMemoryError: unable to create new native thread
twarode
Hi,<br />
<br />
we have the BIRT report engine embedded in our RCP application. Our customers are facing random errors:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
java.lang.OutOfMemoryError: unable to create new native thread
</pre>
when running a report. <br />
I had a short look into it and saw that thousands of org.eclipse.birt.data.engine.executor.DataSource instances are created through org.eclipse.birt.data.engine.executor.DataSourceFactory.getDataSource(String, Map, DataEngineSession). Each of those instances registers a org.eclipse.birt.data.engine.executor.DataSource.ShutdownListener with the same instance of the org.eclipse.birt.data.engine.api.DataEngine. <br />
When the engine finally is shut down, each of those listeners tries to create a new thread which sometimes reaches the OS (WinXP) maximum number of threads and thus produces the error above (heavily depends on timing - I wasn't able to reproduce the error but I saw that thousands of shutdown listeners are being registered).<br />
Is this a general issue or is it just us doing something wrong? <br />
<br />
Cheers,<br />
Tim<br />
<br />
Few more facts:<br />
We are using a scripted data source. <br />
We are using the org.eclipse.birt.report.engine.api.IRunAndRenderTask to run/render the design.<br />
Output format is PDF.
Find more posts tagged with
Comments
JasonW
Tim,
You may want to open a bugzilla entry for this to check into it more. Are you closing the task?
Also is your app running in a jvm with the max perm size set to at least 256? -XX:MaxPermSize=256m
Jason
twarode
Jason,
thanks for your reply. I'll have a look whether I close that task. The max perm size is 128m which should be fine as I feel that the observed behaviour should not be the normal way of working.
I'll have a closer look on this issue on Monday and eventually file a bug.
Cheers,
Tim
EDIT:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335850