PDFGen Operations
Health checks, upgrade notes, and troubleshooting guidance for PDFGen.
Operators should monitor PDFGen alongside Governance Service, which is its only caller. Most report failures come from Auth Service refusing or failing to sign, from the timestamp authority, or from a report too large for the pod. The settings below are the chart values from PDFGen Configuration.
Health Checks
PDFGen has no ingress. Reach it from inside the cluster, or forward its port. These examples use the release name guardian-platform:
kubectl port-forward svc/guardian-platform-eqty-pdfgen 8080:8080 --namespace guardian
curl http://localhost:8080/health/ready{
"status": "ok",
"checks": {
"typst": { "ok": true, "version": "0.14.2", "embedded": true },
"fonts": { "ok": true, "count": 320 },
"tmp_dir": { "ok": true, "path": "tmp" },
"timestamp": { "ok": true, "enabled": true, "message": "RFC 3161 timestamping configured" },
"typst_package_cache": { "ok": true, "path": "/opt/app-root/src/.cache/typst/packages" }
}
}/health/live reports only that the process is serving. /health/ready, which the chart’s startup and readiness probes use, also checks that renders can work: at least one font on TYPST_FONT_PATHS, a writable tmpDir, and that the template package cache directory exists. A failing check returns 503 with the same checks under detail, as {"detail": {"status": "unready", "checks": …}}. The failing check has "ok": false, and tmp_dir and typst_package_cache add a message. The timestamp check always passes; enabled reports whether reports get a timestamp.
Neither probe calls Auth Service or the timestamp authority. To exercise the full path, export a report from Guardian as an Organization Owner or Project Owner; see Reports.
Before Upgrades
PDFGen keeps no data, so an upgrade needs no backup or migration. Review the release notes for changed environment variables, especially any you set through extraEnvVars. On shutdown PDFGen stops accepting requests and finishes the renders in flight. The chart sets no termination grace period, so Kubernetes’ default of 30 seconds applies; an export still running after it fails. During a rollout, an export can also fail with a connection error while a stopping pod is still listed. Either way, the user exports it again.
Common Operational Symptoms
An export that fails in PDFGen returns 502 with “Failed to generate policy report” from Governance Service. The Governance Service log line Failed to generate policy report from pdfgen service carries PDFGen’s status and detail in its error field, such as report request failed [500]: {"detail":"signing failed: …"}. PDFGen logs a request line with the same detail.
report request failed:with a connection error, and no status: Governance Service cannot reach PDFGen. Check that its pods are ready and thatgovernance-service.config.pdfgenServiceUrlis unset or names the PDFGen service.report request failed:withtimeout awaiting response headers: PDFGen did not answer within five minutes of the manifest being sent, because every render slot stayed busy or the pod is stuck. Check its readiness and logs, and add CPU or replicas; see PDFGen Configuration.[500]withsigning failed:andreturned HTTP 501: the platform key’s algorithm has no PDF certificate profile; see Key Configuration. Other statuses frompreflight cert fetch,certificate endpoint, orsigning API, or any of themunreachable, point at Auth Service and its key provider; see Auth Service Operations.[500]withsigning failed: timestamp request to … failed,timestamp authority returned HTTP,timestamp authority refused the request, orinvalid timestamp response: the timestamp authority is unreachable, refused the request, or returned a token that failed verification. Allow egress to it, or setconfig.timestampUrlto"".[500]withsignature does not verify against the cached certificate,returned a certificate for a different key than the cached one, orsigning key rotated since the certificate was fetched: the platform key rotated during the render. Export again.[500]withbound signing:andreturned HTTP 404: withconfig.signingBoundon, PDFGen could not fetch the signing certificate. If the quoted body starts withCannot GET, Auth Service predates bound signing; setconfig.signingBound: false. If it saysSigning key not found or disabled, the platform key is missing; see Key Configuration.[500]withtypst compile exceeded PDFGEN_TYPST_TIMEOUT: the report took longer to lay out than the timeout. RaisePDFGEN_TYPST_TIMEOUTthroughextraEnvVars, or give the pod more CPU.[422]: PDFGen rejected the manifest, anddetailsays why. If it namesPDFGEN_MAX_REQUEST_BYTES, raise that limit throughextraEnvVars, withephemeral-storageto match; otherwise escalate with thedetail.[400]withunsupported paper sizeorunknown format: a script sent apaperother thanus-letter,us-legal, ora4, or aformatother thanziporpdf. Governance Service passes both through unchecked.- Exports wait a long time, then succeed: every render slot is busy. Governance Service waits up to five minutes for PDFGen to answer. Add CPU or replicas; see PDFGen Configuration.
[500]withthe compile worker failed (signal: 9: the pod ran out of memory, and the kernel ended that render. Set or raise the memory limit for the size of report being exported. If memory runs out outside a render, the pod restarts asOOMKilledinstead.- The pod never becomes ready:
curl/health/readyand read the failing check. Afontscount of0meansconfig.typstFontPathswas changed. A failingtmp_dirnames the error in itsmessage: the volume is full, orPDFGEN_TMP_DIRwas overridden throughextraEnvVarsto a path outside it. - The pod exits at startup: its last line,
error: …, names the environment variable at fault; see PDFGen Configuration. - Adobe Acrobat reports a report’s signature as invalid: the platform key is secp256k1; see PDFGen Overview.
Escalation Information
When escalating, include the project, the applied policy, the approximate time, the exporting user’s role, whether they exported from Guardian or with an API key and its scopes, the paper size and format, and the detail from the Governance Service log line. Do not send the report or its attachments unless support asks for them through an approved channel.
Related
- PDFGen Configuration — the settings these checks depend on
- Governance Service Operations — checks for the service that calls PDFGen
- Auth Service Operations — checks when signing fails
- Reports — exporting a report to exercise the full path
- Upgrade — the full platform upgrade process