开发者

Out of memory errors with permsize 1024M and heap size 2048M, for XMLs processed inside for-each loop in XPL, each being about 4.5 MB in size on disk

I have a few for-each loops, that I use to iterate over the elements of a configuration XML which is very small size (2 KB on disk) to arrive at a source URL and a target URL dynamically. Then, I retrieve data from source URL using URLGenerator (because it performs streaming) and load it to XML database using XForms Submissions processor. Source URL and Target URLs are computed dynamically and the innermost loops where the retrieval and loads take place happen about 32 times in total, each time with an XML file of about 4.5 MB on average (max. about 6 MB, min. a few KB). Every time I try this, I get out 开发者_StackOverflowof memory error for Tomcat running with permgen and heap sizes generously allocated, JVM is 32-bit, OS is 32-bit; I want a way out of this out-of-memory errors:

  1. I had thought the separate XForms Submissions will be separate transactions, so will not accumulate causing out-of-memory problem
  2. Is there a way to perform a streaming load using XForms Submissions processor instead of creating full document in memory?
  3. I do not know if that would help, but is there a way to perform aggressive garbage collection in Orbeon so I do not get out-of-memory problems?

If needed, I can post the code here (for the XPL).

Source code (in reply to the comment asking for it)


  1. If you run the oxf:xforms-submission inside a loop, they will run independently, and uploading 30 documents in the loop should only take the memory necessary for the largest document.
  2. The XForms submission needs to have the full document in memory to be able to upload it; it doesn't support streaming (unlike the oxf:url-generator).
  3. The default VM pergen setting is often too low, so I would recommend you to try to increase your permgen space.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜