PHP Agent Parallel Processing Issue - Magento

Hello,

Our PHP Agent is producing critical errors when we attempt to run parallel processes from the PHP app we're monitoring (Magento). Magento has the ability to deploy static assets in parallel to speed up compilation time and this causes the APM agent's critical error when the checkIfMutexCreatedByCurrentProcess function is called.

Is there a way to disable APM monitoring for Magento CLI commands? We tried adding a wildcard "*bin/magento*" to both disable_instrumentations and transaction_ignore_urls but neither worked.

Alternatively, is there a configuration/workaround that would enable the agent to be aware of parallel processes initiated by the primary process?

PHP Agent: Introduction | APM PHP Agent Reference [1.x] | Elastic

Magento CLI Command: php bin/magento setup:static-content:deploy - with the --jobs flag to enable parallel processing

Error log:

frontend/Magento/blank/en_US            1/3137              >--------------------------- 0%     < 1 sec

Error happened during deploy process: PDO object is not initialized, constructor was not called

frontend/Magento/blank/en_US            1/3137              >--------------------------- 0%     < 1 sec            

frontend/ClassyLlama/rebar/en_US        1/3156              >--------------------------- 0%     < 1 sec

Error happened during deploy process: PDO object is not initialized, constructor was not called

[Elastic APM PHP Tracer] 2024-03-08 15:27:13.387372-06:00 [PID: 4015330] [TID: 4015330] [CRITICAL] [Platform] [platform_threads_linux.cpp:237] [checkIfMutexCreatedByCurrentProcess] Cannot perform action on mutex created by another thread. mutex created by process (PID): 4015313, action: lock, mutex address: 0x5602679cffa0, dbg desc: `Background backend communications'; call dbg desc: `signalBackgroundBackendCommThreadToExit'

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.