Where to find core dumps on Azure Linux web app?

Marseu, Moritz 0 Reputation points
2024-09-24T09:34:01.1833333+00:00

I have a Linux web app on Azure App Services. It is running on the built-in PHP container.

For the past few weeks, I've been experiencing the problem that at some point (after days or weeks of uptime) php-fpm starts killing and restarting its child processes.

The log is filled with lines like this:

WARNING: [pool www] child 49910 exited on signal 7 (SIGBUS - core dumped) after 11.058428 seconds from start

My issue is, I can't find the core dump files that the log mentions. The system seems to be misconfigured, so they aren't actually created.

# sysctl kernel.core_pattern
kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h

# ls /usr/lib/systemd/systemd-coredump
ls: cannot access '/usr/lib/systemd/systemd-coredump': No such file or directory

I can't point kernel.core_pattern to anywhere else, either.

# sysctl -w kernel.core_pattern="/tmp/%e-core.%p"
sysctl: permission denied on key "kernel.core_pattern"

From my research, I think that is due to my app running in a container and the core dumps are actually collected by the host. Does that mean there is no way I can access these core dumps to pinpoint the issue with php-fpm?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,770 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,356 Reputation points Microsoft Employee
    2024-09-26T02:42:46.5+00:00

    @Marseu, Moritz You can enable Application Logging for your app and configure it to log to the file system. This will allow you to capture the stdout and stderr output of your app, which may contain useful information about the issue you are experiencing.

    Enable Application Logging:

    • Go to the Azure portal.
    • Navigate to your web app.
    • Under the “Monitoring” section, select “App Service logs”.
    • Enable “Application Logging (Filesystem)”.

    Configure Logging:

    • Set the logging destination to “File System”.
    • Specify a disk quota and retention period according to your needs.

    Access Log Files:

    • Download the log files by navigating to https://<app-name>.scm.azurewebsites.net/api/logs/docker/zip.
    • The log files will be located in the /home/LogFiles/Application directory.

    This method should help you gather more information about the php-fpm processes and potentially pinpoint the root cause of the issue.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.