Question
Virtusa Corp.
LK
Last activity: 14 May 2024 6:04 EDT
HTMLToPDF resulting in session getting stuck with 100% CPU when HTML has Tables
Hi,
The same code is working without any issue in Pega Platform 8.4.3 but is not working in 8.4.4. What I have noticed is Pega 8.4.3 is using PD4ML v.4.0.6.-20190924 where as Pega 8.4.4 environment uses PD4ML v.4.0.9fx3. The generating and attaching of the PDF is called direcly from a Workflow at the start of creating of a Child Case so when issue happens the sessions simply gets stuck and we do not get any response from the Browser. This happens only when source HTML has one or more Table structures. If there are no Table structures in HTML the PDF seems to get generated without any issue.
This stuck session continues to run taking all the CPU cycles of one vCPU and we have no option but to restart the Node after running this 4 times since we have only 4 vCPU associated with the Node.
During one of the debugging sessions we noticed that NOT having UseCompactStylesforPDF set to True seem to avoid session getting stuck but when we click on the generated and attached PDF we see it has not generated properly and got attached (more like 0 byte file).
I would like to understand if anyone else has seen this issue and found a solution.
Thanks and regards,
Dhammike
***Edited by Moderator: Marije to add old support ticket tag INC-189976 and INC-B17362 and
INC-B9817***
-
Reply
-
Ajay Gajula -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 11 Mar 2024 11:12 EDT
Pegasystems Inc.
GB
@VamsiK I found the support ticket INC-18997 (PDF not generated when HTML includes a Table structure) which was logged for this issue:
Solution provided by GCS for the 8.4.4 version
----------------------------------------
Notes: During the PDF generation we are making use of third-party library pd4ml jar 4 0 9 fx3 which has currently few limitations w.r.t performance based & other alignment issues. This ia a bug and this is an expected limitation from from the existing PD4ML jar to where the client has upgraded.
In order to overcome this performance issue we can use the existing HFIX- 80300 which contains the stable jar 4 0 6 , which has to fixed the reported issue. Hence closing the issue.
Solution description:
1.Set UseCompactStylesforPDF DSS parameter as true
2.Apply HFIX- 80300 (this contains an older stable 4.0.6 pd4ml version)
-----------------------
As you are on a later version likely you are experiencing a different issue.
Troubleshooting HTML-to-PDF Conversion issues
Please log a support issue via the MSP if you need further help.
@VamsiK I found the support ticket INC-18997 (PDF not generated when HTML includes a Table structure) which was logged for this issue:
Solution provided by GCS for the 8.4.4 version
----------------------------------------
Notes: During the PDF generation we are making use of third-party library pd4ml jar 4 0 9 fx3 which has currently few limitations w.r.t performance based & other alignment issues. This ia a bug and this is an expected limitation from from the existing PD4ML jar to where the client has upgraded.
In order to overcome this performance issue we can use the existing HFIX- 80300 which contains the stable jar 4 0 6 , which has to fixed the reported issue. Hence closing the issue.
Solution description:
1.Set UseCompactStylesforPDF DSS parameter as true
2.Apply HFIX- 80300 (this contains an older stable 4.0.6 pd4ml version)
-----------------------
As you are on a later version likely you are experiencing a different issue.
Troubleshooting HTML-to-PDF Conversion issues
Please log a support issue via the MSP if you need further help.
Please see the latest PD4ML fix in the Pega Platform 23.1.1 Patch Resolved Issues
Also note that we upgraded to PD4ML 4.0.19 jar in . We will upgrade to PD4ML 4.0.19 jar which having latest fixes. You can look up PD4ML in the Resolved issues of the below:
Version 8.8.5 (BUG-848059)
Version 23.1.2 (BUG-848060)
Labb Consulting
NL
We seem to have run into the same problem on v8.8.1 recently. How was your problem solved? Can you share the resolution steps please?
Regards,
DJ
Virtusa Corp.
LK
@VamsiKI think this was resolved by using the version recommended by Pega as part of a support ticket. I was not part of the team when this got resolved and do not have details of exact change done.
Accepted Solution
Updated: 11 Mar 2024 11:12 EDT
Pegasystems Inc.
GB
@VamsiK I found the support ticket INC-18997 (PDF not generated when HTML includes a Table structure) which was logged for this issue:
Solution provided by GCS for the 8.4.4 version
----------------------------------------
Notes: During the PDF generation we are making use of third-party library pd4ml jar 4 0 9 fx3 which has currently few limitations w.r.t performance based & other alignment issues. This ia a bug and this is an expected limitation from from the existing PD4ML jar to where the client has upgraded.
In order to overcome this performance issue we can use the existing HFIX- 80300 which contains the stable jar 4 0 6 , which has to fixed the reported issue. Hence closing the issue.
Solution description:
1.Set UseCompactStylesforPDF DSS parameter as true
2.Apply HFIX- 80300 (this contains an older stable 4.0.6 pd4ml version)
-----------------------
As you are on a later version likely you are experiencing a different issue.
Troubleshooting HTML-to-PDF Conversion issues
Please log a support issue via the MSP if you need further help.
@VamsiK I found the support ticket INC-18997 (PDF not generated when HTML includes a Table structure) which was logged for this issue:
Solution provided by GCS for the 8.4.4 version
----------------------------------------
Notes: During the PDF generation we are making use of third-party library pd4ml jar 4 0 9 fx3 which has currently few limitations w.r.t performance based & other alignment issues. This ia a bug and this is an expected limitation from from the existing PD4ML jar to where the client has upgraded.
In order to overcome this performance issue we can use the existing HFIX- 80300 which contains the stable jar 4 0 6 , which has to fixed the reported issue. Hence closing the issue.
Solution description:
1.Set UseCompactStylesforPDF DSS parameter as true
2.Apply HFIX- 80300 (this contains an older stable 4.0.6 pd4ml version)
-----------------------
As you are on a later version likely you are experiencing a different issue.
Troubleshooting HTML-to-PDF Conversion issues
Please log a support issue via the MSP if you need further help.
Please see the latest PD4ML fix in the Pega Platform 23.1.1 Patch Resolved Issues
Also note that we upgraded to PD4ML 4.0.19 jar in . We will upgrade to PD4ML 4.0.19 jar which having latest fixes. You can look up PD4ML in the Resolved issues of the below:
Version 8.8.5 (BUG-848059)
Version 23.1.2 (BUG-848060)
SiXworks
GB
@MarijeSchillern We are seeing what appears to be the same problem in Pega 8.8.4 (on Pega Cloud). Do you know if this issue has been reported in this version previously?
When looking at the events in PDC, the PAL data shows large pxBytesAllocated, for example - 119,110,882,048.00 even though the documents are nowhere near that large.
This is the stack trace from our Production environment:
@MarijeSchillern We are seeing what appears to be the same problem in Pega 8.8.4 (on Pega Cloud). Do you know if this issue has been reported in this version previously?
When looking at the events in PDC, the PAL data shows large pxBytesAllocated, for example - 119,110,882,048.00 even though the documents are nowhere near that large.
This is the stack trace from our Production environment:
com.pd4ml.html.doc.render.Renderer.getFloat(Renderer.java:183) com.pd4ml.html.doc.render.Renderer.isFloating(Renderer.java:164) com.pd4ml.html.doc.render.BoxRenderer.marginTop(BoxRenderer.java:456) com.pd4ml.html.doc.render.BoxRenderer.verticalOffset(BoxRenderer.java:665) com.pd4ml.html.doc.render.BoxRenderer.verticalOffset(BoxRenderer.java:670) com.pd4ml.html.doc.render.to.Context$PageBreakRef.getOffset(Context.java:211) com.pd4ml.html.doc.render.to.Context.sortPageBreaks(Context.java:375) com.pd4ml.html.doc.render.to.PdfTargetRenderer.render(PdfTargetRenderer.java:323) com.pd4ml.PD4ML.writePDF(PD4ML.java:1758) com.pega.pegarules.integration.engine.internal.util.PDFUtilsImpl.invokePD4ML(PDFUtilsImpl.java:245) com.pega.pegarules.integration.engine.internal.util.PDFUtilsImpl.generatePDF(PDFUtilsImpl.java:171) com.pega.pegarules.integration.engine.internal.util.PDFUtilsImpl.generatePDF(PDFUtilsImpl.java:193) com.pegarules.generated.activity.ra_action_htmltopdf_6f21429218308b1870939b586f71bf9d.step9_circum0(ra_action_htmltopdf_6f21429218308b1870939b586f71bf9d.java:736) com.pegarules.generated.activity.ra_action_htmltopdf_6f21429218308b1870939b586f71bf9d.perform(ra_action_htmltopdf_6f21429218308b1870939b586f71bf9d.java:213) com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2872) com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:11509) com.pegarules.generated.activity.ra_action_pyattachaspdf_a7743fd2c51eca1a1cbb3e940ddc5d93.step6_circum0(ra_action_pyattachaspdf_a7743fd2c51eca1a1cbb3e940ddc5d93.java:524) com.pegarules.generated.activity.ra_action_pyattachaspdf_a7743fd2c51eca1a1cbb3e940ddc5d93.perform(ra_action_pyattachaspdf_a7743fd2c51eca1a1cbb3e940ddc5d93.java:162) com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2872) com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:11509) com.pegarules.generated.activity.ra_action_pxcreatepdf_f5e81d2c9f144ac32945465d11a48f9c.step7_circum0(ra_action_pxcreatepdf_f5e81d2c9f144ac32945465d11a48f9c.java:734) com.pegarules.generated.activity.ra_action_pxcreatepdf_f5e81d2c9f144ac32945465d11a48f9c.perform(ra_action_pxcreatepdf_f5e81d2c9f144ac32945465d11a48f9c.java:178) com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2872) com.pegarules.generated.flow.ra_action_attachmentflow_a7b6bcaee6c81a2af3cc9ad2471b558e.RunTaskActivity(ra_action_attachmentflow_a7b6bcaee6c81a2af3cc9ad2471b558e.java:2002) com.pegarules.generated.flow.ra_action_attachmentflow_a7b6bcaee6c81a2af3cc9ad2471b558e.Task_Utility2_circum0(ra_action_attachmentflow_a7b6bcaee6c81a2af3cc9ad2471b558e.java:1077) com.pegarules.generated.flow.ra_action_attachmentflow_a7b6bcaee6c81a2af3cc9ad2471b558e.perform(ra_action_attachmentflow_a7b6bcaee6c81a2af3cc9ad2471b558e.java:595) com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2872) com.pegarules.generated.StartFlow_080401__6867397908777742199.StartFlow08_04_01(StartFlow_080401__6867397908777742199.java:165) com.pegarules.generated.StartFlow_080401__6867397908777742199.invoke(StartFlow_080401__6867397908777742199.java:74) com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:238) com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:125) com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:9820) com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflectionWithException(LibrarySupport.java:277) java.lang.invoke.LambdaForm$DMH/491044090.invokeStatic_L3_L(LambdaForm$DMH) java.lang.invoke.LambdaForm$BMH/1084870600.reinvoke(LambdaForm$BMH) java.lang.invoke.LambdaForm$MH/1738486477.linkToTargetMethod(LambdaForm$MH) com.pegarules.generated.pzStartStageFlow_080101_6602335682237037817.pzStartStageFlow08_01_01(pzStartStageFlow_080101_6602335682237037817.java:168) com.pegarules.generated.pzStartStageFlow_080101_6602335682237037817.invoke(pzStartStageFlow_080101_6602335682237037817.java:78) com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:238) com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:125) com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:9820) com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflectionWithException(LibrarySupport.java:277) java.lang.invoke.LambdaForm$DMH/491044090.invokeStatic_L3_L(LambdaForm$DMH) java.lang.invoke.LambdaForm$BMH/1294444430.reinvoke(LambdaForm$BMH) java.lang.invoke.LambdaForm$MH/540963678.linkToTargetMethod(LambdaForm$MH) com.pegarules.generated.casetype.ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.PRIM1_FLOW4_start_circum0(ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.java:2067) com.pegarules.generated.casetype.ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.PRIM1_FLOW1_end_circum0(ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.java:2059) com.pegarules.generated.casetype.ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.PRIM1_processEnd_circum0(ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.java:2221) com.pegarules.generated.casetype.ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.onProcessEnd_circum0(ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.java:2169) com.pegarules.generated.casetype.ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.doStagePurposes_circum0(ra_action_pydefault_e7e2ea996d28eba904cec4429631ed33.java:1235)
Updated: 17 Apr 2024 6:27 EDT
Pegasystems Inc.
GB
@andwww in Pega 8.8.4 the PD4ML version was updated according to the Resolved Issues documentation.
See Updates to PD4ML support for details on the use of the library.
I suggest that you log a new support issue via the MSP so that our GCS team can look into your issue in detail. Feel free to reply with the INC id here so that we can help track your issue on 8.8.4.
What I have found, is that in BUG-848059 (Upgrade to latest version of pd4ml) it shows that Pega 8.8.5 has yet another updated PD4ML version. This Pega Patch will be release around 10th May.
--> I highly recommend that you wait until after the Product Availability is announced so you can install the Patch and test your issue again before contacting our support team.
SiXworks
GB
@MarijeSchillern Many thanks for the reply
SiXworks
GB
Updated: 29 Apr 2024 9:51 EDT
Pegasystems Inc.
GB
@andwww the ticket you quote, INC-B17362 ( Requestor locked in HTMLTOPDF) has been logged against 8.4.4, not 8.8.4.
Please can you check and confirm what version you are reporting your PEGA0086 - Requestor lock detected / Create PDF flow shape alerts against?
SiXworks
GB
@MarijeSchillern It was raised against Platform 8.8.4 - MSP defaulted the CS version to 8.4.4. I'll get the ticket updated, thanks
Updated: 29 Apr 2024 9:57 EDT
Pegasystems Inc.
GB
@andwww it seems that this issue was already logged with our support team by your colleague Ben. It has been open since March 8th - INC-B9817 ( Node Requestor Lock Exceptions).
Our support team will continue to work with you and Benjamin using that MSP ticket.
Pegasystems Inc.
GB
@andwww our support team did not hear back from your colleague Ben since April 23rd so INC-B9817 ( Node Requestor Lock Exceptions). has been closed.
I would suggest that if you still need help you re-engage with GCS in that ticket asap whilst the 'Reopen' MSP button stays active only for 20 days.
----------------------------------------
Resolution notes:
Client was unable to reproduce the issue in the previous Client call. Client informed that this issue is very sporadic for them. Requested Client to get back to us when they able to reproduce the issue but we didn't get any updates from Client from long time.
Also, we didn't get required artifacts from Client like "pyCompactStylesforPDF" css file and sample PDF.
In the last Client call, we observed that "#{}" is missing in the beginning of "pyCompactStylesforPDF" css file. So, suggested Client to add "#{}" in the beginning of "pyCompactStylesforPDF" css file and check if it resolves the issue.
-----------------------------------------------