Posts

Showing posts with the label php display running stack trace openshift

Displaying running PHP 7.4 stack trace on Red Hat UBI Container

Image
 When running a PHP application in container, sometimes we need to find out what bottleneck is impacting the app's response time. This post documents the approach to do so, but still requiring access to root user in the container. The platform where I was running the PHP app is Red Hat Openshift Community (OKD) version 3.6, which is still using docker to run containers instead of Red Hat's podman. Preparation - Locating the pod and the worker node Open openshift's console home Select your Project (namespace) containing the pod Select Application => Pods Choose your pod from the list. Note the worker node hosting the pod. Install php debug-info Normally, the openshift platform doesn't allow containers running as root. So are in this case, the container will be running as normal random-uid-user. But we need to install php debuginfo packages, thus we need to run as root. The trick is to access the node running the application's pods, so we need admin access on the w...