Have you been running out of memory when processing letters through CommGen?  If the process is grinding along but too slowly, or if the process fails altogether, you may be running into a recently discovered bug for which we have a workaround.  You may also be able to improve processing speed by employing a technique to significantly reduce the graphics load in your document.

 

First, let's talk about the bug. Bug 20423942 has been reported to Development because garbage collection hasn't been handled well during the process.  Sometimes there may be unrecoverable application objects that can no longer be referenced from PeopleCode, but which have not been reclaimed and so are still taking up computer memory. The CollectGarbage() function is automatically invoked by the application server as part of its end-of-service processing, so generally it is not necessary to call it for online applications. However, in Application Engine it is possible that a long-running batch job could grow in memory usage over time as these unreferencable Application Objects accumulate. The problem identified in the bug is that we only call the garbage collector once, rather than periodically, to reclaim these objects.

 

If you'd like to overcome the problem that this causes for you, you can add "CollectGarbage()" to a specific location in the SCC_COMMGEN AppEngine. You can read more about this workaround in SCC_COMMGEN Memory Consumption Issues (Doc ID 2015485.1).

 

Even if you aren't having this problem, or have already overcome it, you can improve processing by reviewing the way that you handle logos and other graphics in your letters.  If you are using MicroSoft Word for your letters and include a logo, you may be running the process with a graphic that can be significantly reduced in size.  Word by default will include the graphic as an .rtf file, but if you save the letter as an html file Word will also save a form of the graphic in another folder as a .png and .gif.  These are much smaller in size and by substituting them for your current image you can improve performance rather substantially.  Take a look at SCC_COMMGEN Memory Consumption Issues due to TEMPLATE SIZE (Doc ID 2015496.1) to find out how to do this.