Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process received a SIGTERM signal #14

Closed
thomasmoreaumaster opened this issue Aug 29, 2021 · 3 comments
Closed

Process received a SIGTERM signal #14

thomasmoreaumaster opened this issue Aug 29, 2021 · 3 comments

Comments

@thomasmoreaumaster
Copy link

Hello @adrianrudnik

Thanks a lot for your work :)

It works fine locally, and we try to deploy it on kubertes.
But the process always received a SIGTERM signal.

Any idea how we can debug it ?

here the logs of the container :

self: mjml-server-5d9b97dd4b-77dqw:80
cors: *
mjml keep comments: false
mjml validation level: soft
mjml minify: true
mjml beautify: false

POST mjml as text/plain raw body, result will be returned as text/html.
process received a SIGTERM signal
app stopped by SIGTERM with value 15

Thank you for your help,
Thomas.

@adrianrudnik
Copy link
Owner

adrianrudnik commented Aug 29, 2021

Hi Thomas, that sounds strange, SIGTERM is normally a hard kill by the host, so I'm not sure what could happen there.

As I'm not so much into k8s, but here is an idea why this could happen: The healthcheck goes bad / is not doing it a k8s way and kills the process before the healthcheck reports a heatly service?

Try to remove https://github.com/adrianrudnik/mjml-server/blob/develop/Dockerfile#L23 to L24 and deploy that service and see if it stays alive.

Otherwise I would suspect a misconfigured service, like not auto-upping it or downscaling it to zero? Not sure that makes sense.

Feel free to post a minimal config I could start of with MicroK8s if you can, never did it myself, just doing docker :)

@adrianrudnik
Copy link
Owner

Hi Thomas,

I just reviewed some parts and improved the healthcheck (and made that toggleable). Can you try the image adrianrudnik/mjml-server:issue-14?

The new ENV available is HEALTHCHECK=true|false if you want to skip the healthchecking, but please try without first, thanks!

@thomasmoreaumaster
Copy link
Author

Hi @adrianrudnik

Thanks a lot for your help on that.

We found out why the container keep restarting to finally crashLoopBack while deploying on k8s environment.
We configure two importants options for our container to be healthy, it is the same as your healthcheck option but for k8s :
livenessProbe: exec: command: - curl - -X POST - 'http://localhost:80/' initialDelaySeconds: 30 periodSeconds: 30 readinessProbe: exec: command: - curl - -X POST - 'http://localhost:80/' initialDelaySeconds: 25
@Vinarnt will push our helm configuration for you to integrate if you want to easier the deployment of the app.

Once again thanks for your reply,
Thomas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants