arachnys / athenapdf

Drop-in replacement for wkhtmltopdf built on Go, Electron and Docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors running arachnysdocker/athenapdf-service:2.12.0 in k8s

jeffdeville opened this issue · comments

Here's an example of the logging errors:

E [Worker #3] processing conversion job (pending conversions: 30)
E [AthenaPDF] converting to PDF: /tmp/tmp895906717.html
E captured errors:
E Error #1: exit status 1 :
E (athenapdf:16901): Gtk-WARNING **: cannot open display: :99

execing into the box does not include the tmp files, but presumably it's cleaning up after itself, since the error implies a different problem.

I'm going to restart the pod, and see if it recurs. We have another instance of athena running in the same cluster that is working just fine.

Question: Assuming a restart helps, is there a way to detect these problems, and restart the app from k8s?

Some comparisons between the working pods vs the not working one:

Working:

Not Working:

There's a PR opened https://github.com/arachnys/athenapdf/pull/159/files that will address cases where the display server dies. In such a case, a simple check on k8s side should be enough to automatically restart the pod.

@jeffdeville, we merged the aforementioned PR, and released it under https://github.com/arachnys/athenapdf/releases/tag/v2.13.0. Give arachnysdocker/athenapdf-service:2.13.0 a try as we are using it on Kubernetes as well without any problems.