Output post Processor(OPP)



Last updated on April 14th, 2017 at 03:25 pm

The Output Post Processor (OPP) is an enhancement to Concurrent Processing and is designed to support XML Publisher as post-processing action for concurrent requests. If a request is submitted with an XML Publisher template specified as a layout for the concurrent request output, then after the concurrent manager finishes running the concurrent program, it will contact the OPP to apply the XML Publisher template and create the final output.

Here are the steps involved

1. An application user submits an XML Publisher based report.
2. The standard concurrent manager processes the request.
3. The XML data file is generated by the standard concurrent manager.
4. A post processing action defines that the output needs to be generated by the Output Post Processor ,So standard manager send the request in the queue of OPP
5. The Output Post Processor generates the final report and informs the standard concurrent manager whether that was successful.
6. The standard concurrent manager finalizes the concurrent request

The Output Post Processor makes use of the Oracle Streams Advanced Queuing (AQ) database feature. Every OPP service instance monitors the FND_CP_GSM_OPP_AQ queue for new messages and this queue has been created with no value specified for primary_instance (link). This implies that the queue monitor scheduling and propagation is done in any available instance. In other words, ANY OPP service instance may pick up an incoming message independent of the node on which the concurrent request ran.

Maximum Memory Usage Per Process:

The maximum amount of memory or maximum Java heap size a single OPP process can use is by default set to 512MB. This value is seeded by the Loader Data File: $FND_TOP/patch/115/import/US/afoppsrv.ldt which specifies that the DEVELOPER_PARAMETERS is “J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx512m”.

How to determine the current maximum Java heap size:

SELECT service_id, service_handle, developer_parameters
FROM fnd_cp_services
WHERE service_id = (SELECT manager_type
FROM fnd_concurrent_queues
WHERE concurrent_queue_name = ‘FNDCPOPP’);

SERVICE_ID SERVICE_HANDLE DEVELOPER_PARAMETERS
———- ————– ——————————————————–
1091 FNDOPP J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx512m

 

Increase the maximum Java heap size for the OPP to 1024MB (1GB):

UPDATE fnd_cp_services
SET developer_parameters =
‘J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx1024m’
WHERE service_id = (SELECT manager_type
FROM fnd_concurrent_queues
WHERE concurrent_queue_name = ‘FNDCPOPP’);

The OPP queue can be Recreated the using $FND_TOP/patch/115/sql/afopp002.sql file as ‘APPLSYS’ user. On running the script you will be prompted for username and password.

There are 2 new profiles options that can be used to control the timeouts

Profile Option : Concurrent:OPP Response Timeout
Internal Name : CONC_PP_RESPONSE_TIMEOUT
Description : Specifies the amount of time a manager waits for OPP to respond to its request for post processing.

Profile Option : Concurrent:OPP Process Timeout
Internal Name : CONC_PP_PROCESS_TIMEOUT
Description : Specifies the amount of time the manager waits for the OPP to actually process the request.

Related:Oracle concurrent Manager

How to check OPP logfiles

To investigate on XML issues or other publishing problems, often the OPP logfile is needed.
Below are the steps to find log file from Front end

1. Login to the application as SYSADMIN

2. Responsibility: System Administrator

3. Function: Concurrent –> Manager –> Administration

4. Select the Output Post Processor

5. Click on the Processes button

6. Select the Concurrent Process which was active during the time that the request ran

7. Click on the Manager Log button to open the Output Post Processor log file

Directly from the file system based after identifying the corresponding OPP log file name using the following SQL statement:

SELECT fcpp.concurrent_request_id req_id, fcp.node_name, fcp.logfile_name
FROM fnd_conc_pp_actions fcpp, fnd_concurrent_processes fcp
WHERE fcpp.processor_id = fcp.concurrent_process_id
AND fcpp.action_type = 6
AND fcpp.concurrent_request_id = &&request_id

Threads and Processes for Output post processor

OPP Service is multi-threaded  process.

OPP processes and threads can be seem from Concurrent Manager define form

1) Logon to Applications with “System Administrator” responsibility

2) Navigate to Concurrent -> Manager -> Define

3) Query for “Output Post Processor”

4) Click on “Work Shifts” and This will show the number of processes

One service instance of the OPP service is seeded by default. This seeded OPP service instance has one workshift with one process

if you on parameters, you will see the threads

oracle.apps.fnd.cp.opp.OPPServiceThread:2:0:max_threads=5

The max_threads parameter controls the maximum number of request threads. This number may be increased depending on the workload.If all the OPP process has reached their respective maximum number of threads, the requests waiting to be processed remain in a queue to be processed as soon as threads become available

It is suggested to increase the number of “threads” as much as possible, then start adding “Processes”, if needed.The limiting factor with increasing “threads” is memory, if one sets the max heap size of a JVM to 2GB, then all “threads” will share this memory.

To get optimum performance, it is suggested to keep “Processes” to a minimum. It is recommended to have 2 OPP “Processes” with more “threads”.

 

General errors with OPP 

  1.  (CONC-PP NO RESPONSE):

Error meaning:The Output Post-processor is running but has not picked up this request. No further attempts will be made to post-process this request, and the request will be marked with Warning status.Setting the profile option Concurrent: OPP Response Timeout to a higher value may be necessary.

Solution:

The Concurrent Manager process generates the XML data file. Upon completion it will trigger the Output Post Processor in order to merge the XML data file and the template which was selected on the Submit Request form.The number of Concurrent Requests that the Output Post Processor can handle in parallel depends upon:
the number of Processes
the number of Threads Per Process

The values are 4 Processes and 5 Threads Per Process so a total of 20 reports can be processed in parallel.

In case there are other Concurrent Requests running which have already invoked the OPP then it might happen that no additional requests can be picked up for a period of time. The pending request will be picked up as soon as one of the running jobs completes.By default a timeout will occur if it takes longer then 120 seconds (2 min.) for the Output Post Processor to pick up the request from the Concurrent Manager process. In that case, the Concurrent Request will complete with status Warning and the Request log file will contain Error Message A (see above)

2) CONC-PP TIMEOUT

Solution:Once the Output Post Processor picks up the request, the XML Publisher engine is invoked to generate the final output file. The time that this takes will depends on various elements such as:

size of the XML Data File
complexity of the template
performance of the server
….
By default a timeout will occur if it takes longer then 300 seconds (5 min.) for the XML Publisher engine to generate the output file. The Concurrent Request will complete with status Warning and the Request log file will contain Error Message . We will need to increase the timeout if necessary in our env to avoid this error

3) java.lang.OutOfMemoryError error

A high number of threads increases the risk of running into java.lang.OutOfMemoryError errors during peak loads. So Limit  the number of threads per OPP process: each thread will process a single report thus more threads means that more reports can run in parallel however they share the maximum Java heap size per process
Enable the scalable feature of XSLT processor on Template level and only for those reports that are known to process large amounts of data. It is not recommended to enable the scalable feature of XSLT processor at the global level.

4) How to restart OOP

Using System Administrator responsibility navigate to

Concurrent–>Manager–>Administer ->query for the Output Post Processor

The Actual should equal to the Target processes (eg: Actual=2 Target =2)

Deactivate and Activate

Alternatively you can click on Restart.

If not stopped/deactivated please check the processes and kill and try to start

ps -ef |grep java | grep -v grep | grep FNDOPP

5)  Out of memory in concurrent Program

For the specific concurrent program which is showing OPP relate outofmemory issue, you can think of increasing run time memory

Go to “System Administrator” responsibility.

Navigate to Concurrent – > Program – > Define.

Search for the concurrent program

Set the Options field to -Xmx1024M (can be set to 2048M if program still fails)

Save.

Bounce the Concurrent Manager for the effects to take place.

Related Articles

Top 30 Most Useful Concurrent Manager Queries

Parallel Concurrent Processing

Top 10 Useful oracle apps queries for DBA

Awesome Useful Oracle Apps script to debug it

 

 


Leave a Reply