Enable Core Dumps in Proxmox Containers?

batonac

Renowned Member
Aug 2, 2015
15
3
68
York, PA, USA
avu.nu
My PHP-FPM services are constantly crashing in my Containers. The PHP and syslogs aren't giving much insight, so I'm looking to enable core dumps inside the container itself. The Enable Core Dump systemd instructions on the wiki work fine for the host, but I need to produce and grab the core dump inside the container, from what I can tell. How is this possible?
 
core dumps dont make any sense in containers, since they dont have their own kernel. look at the logs on the host- you probably have too little memory assigned and the OOM killer keeps killing your services.
 
I don't think it's OOM. Here's what I'm getting from dmesg | grep php:

[ 208.020676] php-fpm8.1[11395]: segfault at 7ffe62b25ff8 ip 0000561fcb1073a2 sp 00007ffe62b26000 error 6 in php-fpm8.1[561fcaf2c000+2fd000] likely on CPU 12 (core 12, socket 0)
[ 759.373936] php[38399]: segfault at 7ffd5b215ff8 ip 00005610bd8f9244 sp 00007ffd5b216000 error 6 in php8.1[5610bd71c000+2f2000] likely on CPU 13 (core 13, socket 0)

I think I'm understanding what you're saying, and since posting realized that I am getting coredumps from the container processes on the host, but I'm not sure how to read them outside the context of the container. This is my first time trying to use coredumps, so please excuse my ignorance.
 
you may want to look around these entries in your log for clues (-B40 -A40)

If its not memory, the next likely culprit is some dislike between your container's distro/software versions and the kernel- see if you can deploy on a different container OS/version nearer in default kernel ver to the proxmox one. hint- proxmox uses ubuntu kernels.
 
I'm running the latest Ubuntu LTS (22.04), so there shouldn't be an issue there. It's a really obscure error that I seem to have narrowed down to using Docket Cache (Opcache-based Object Caching) with WordPress. Exactly why it's occurring is still mystifying to me.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!