Blackfire APM attempting to run even if not configured about docker
Description
We are seeing [Error] APM: Locking APM for 300 seconds for reason: Cannot connect to the agent very frequently in our logs. I assume this is coming from Blackfire, as it is installed in these php images.
Also at this different point in time, there is a delay of 10s when opening a web page.
https://coder.social/craftcms/docker/issues/55
Steps To Reproduce
- Start Docker
- Open web page
Expected Result
When disabled Blackfire php extension

Actual Result
When enabled Blackfire php extension


I'm unable to replicate any issue, and cannot get requests to delay 10 seconds. What specific docker-magento images are you running, and are there steps to follow to replicate this? What O/S are you running? Blackfire should be disabled by default.
I'm unable to replicate any issue, and cannot get requests to delay 10 seconds. What specific docker-magento images are you running, and are there steps to follow to replicate this? What O/S are you running? Blackfire should be disabled by default.
I am using the latest docker-magento images with PHP 8.1. OS Windows 11 + WSL2, Latest build of Docker Desktop.
For the test, I used a single php file with any content. There was no delay on previous builds of the image. The delay appears only when there is an error in the logs associated with the Blackfire extension. In what period of time it appears, I do not know, most likely it is 300 seconds.
The Blackfire extension is enabled by default, just not configured. https://github.com/markshust/docker-magento/blob/2245c1b5ab11ad0ef4b0dc31462851baf47173a1/images/php/8.1/Dockerfile#L86
I provided a link to a similar issue (https://coder.social/craftcms/docker/issues/55).
After disabling the Blackfire extension, the problem went away.
Someone can confirm?
The delay appears only when there is an error in the logs associated with the Blackfire extension.
Why do you have a blackfire log file? Can you not just delete it? 😀
The delay appears only when there is an error in the logs associated with the Blackfire extension.
Why do you have a blackfire log file? Can you not just delete it? 😀
Mark, I'm just tired of deleting it every time. 😀
Tagging with wontfix due to lazyness of the ticket filer 😆
I get the same error:
[27-Dec-2023 21:37:33] WARNING: [pool www] child 16 said into stderr: "Wed Dec 27 21:37:33 2023 (16): [Error] APM: Locking APM for 300 seconds for reason: Cannot connect to the agent"
Windows 11. WSL2, Ubuntu 22.04 PHP8.2 Latest Image