-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
If an APM subscriber were to execute a database command from a listener method (e.g. commandStarted, it could result in a recursion chain and crash the PHP interpreter (see: http://phpsadness.com/sad/50).
We should consider adding a guard around APM event dispatching to avoid this. Otherwise, we should at least document the risk of doing so and advise users not to execute commands from an APM listener without some filtering mechanism.
A potential scenario where this could come up might be if an application fed its APM events to a logging service, and that logging service in turn was configured to store data in MongoDB.
- related to
-
CDRIVER-3658 SDAM events deadlock if user callback tries to lock topology mutex
- Backlog
-
PHPC-1741 Remove getServer API and manager reference from APM event classes
- Closed