com.pdftron.server.HeartbeatException: heartbeat: failed for job

WebViewer Version: 10.9
WebViewer Server Version: 2.2.2

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos?
Are you using the WebViewer server? Yes
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No
Is your issue related to annotations? No

Please give a brief summary of your issue:

Repeated errors in logs: “com.pdftron.server.HeartbeatException: heartbeat: failed for job”

Please describe your issue and provide steps to reproduce it:

I’ve deployed the pdftron/webviewer-server:2.2.2 docker image to a Cloud Run instance on Google Cloud Platform.

I see dozens of Heartbeat Exceptions and I’m not sure what’s causing them (or what the effect is)

java.util.concurrent.ExecutionException: com.pdftron.server.HeartbeatException: heartbeat: failed for job - 9f2f844d-cf37-4a99-bef4-46560a202378

at java.util.concurrent.CompletableFuture.reportGet ( java/util.concurrent/CompletableFuture.java:396 )
at java.util.concurrent.CompletableFuture.get ( java/util.concurrent/CompletableFuture.java:2073 )
at com.pdftron.server.BlackBoxPoller.waitForResult ( com/pdftron.server/BlackBoxPoller.java:34 )
at com.pdftron.server.BlackBoxExecutor.sendJobAndWait ( com/pdftron.server/BlackBoxExecutor.java:122 )
at com.pdftron.server.BlackBoxClient.doOperation ( com/pdftron.server/BlackBoxClient.java:69 )
at com.pdftron.server.Operation.doDocOperation ( com/pdftron.server/Operation.java:63 )
at com.pdftron.server.TypeOperation$Render.doOperation ( com/pdftron.server/TypeOperation.java:94 )
at com.pdftron.server.Util.makeThumb ( com/pdftron.server/Util.java:114 )
at com.pdftron.server.DocReference.generateThumbUnsafe ( com/pdftron.server/DocReference.java:461 )
at com.pdftron.server.DocManagement$DocFetchTask.doThumb ( com/pdftron.server/DocManagement.java:199 )
at com.pdftron.server.DocManagement$DocFetchTask.run ( com/pdftron.server/DocManagement.java:186 )
at java.util.concurrent.ThreadPoolExecutor.runWorker ( java/util.concurrent/ThreadPoolExecutor.java:1136 )
at java.util.concurrent.ThreadPoolExecutor$Worker.run ( java/util.concurrent/ThreadPoolExecutor.java:635 )
at java.lang.Thread.run ( java/lang/Thread.java:840 )
Caused by: com.pdftron.server.HeartbeatException

at com.pdftron.server.BlackBoxPoller.call ( BlackBoxPoller.java:88 )
at com.pdftron.server.BlackBoxPoller.call ( BlackBoxPoller.java:15 )
at java.util.concurrent.FutureTask.run ( FutureTask.java:264 )

Here is a snippet of my Cloud Run YAML so you see the memory allocations:

 spec:
      containerConcurrency: 80
      timeoutSeconds: 300
      serviceAccountName: [redacted]
      containers:
      - name: wvserver-1
        image: [redacted]/wvserver:2.2.2
        ports:
        - name: http1
          containerPort: 8090
        env:
        - name: TRN_PDFNET_KEY
          value: [redacted]
        - name: INCLUDE_DEMO
          value: 'false'
        resources:
          limits:
            cpu: 4000m
            memory: 2Gi
        startupProbe:
          timeoutSeconds: 240
          periodSeconds: 240
          failureThreshold: 1
          tcpSocket:
            port: 8090

Please provide a link to a minimal sample where the issue is reproducible:

+1 on that one. We see the same exception from time to time running the same version but in Kubernets on Azure.

Hello,

“heartbeat: failed for job” usually means that when loading a specific file, there was an issue that cause a failure.

If you could provide the file that causes this issue, we can investigate further.

Best regards,
Tyler

Hi Tyler,

I can provide the file, but I don’t think that’s the issue, as this seems to happen for any file that’s fetched after the server has been online for some time.

Do clients need to unsubscribe from using the server? Is there something else that would explain why the heartbeat calls would fail?

This seems to be indicative of an overall server failure as it is also experiencing other issues around the same time (WebViewer Server timeouts - #6 by kkim)

Hello zack,

Can you try with the latest version 2.2.4?
We have changed and improved the healthcheck for the container, and some other changes as well which you can read here: Server-changelog-2024 | Apryse Documentation

Best regards,
Tyler

I’m not sure I’ll be able to help confirm this fixes the Heartbeat issue. I was having many, many issues trying to run Webviewer Server on GCP. So I moved only this specific service to Azure and we haven’t had any problems since.