Debug - Node Heapsnapshot
Generate a node heapsnapshot for debugging.
Prerequisites
- Set
WAHA_DEBUG_MODE=Trueenvironment variable. - Restart the container.
Usage
The Observability facade's heapSnapshot method may be used to generate a node heapsnapshot.
TIP
Execute this request only when the issue is happening to collect the most recent information.
php
use NjoguAmos\Waha\Facades\Observability;
/** @var \Saloon\Http\Response $heap */
$heap = Observability::heapSnapshot();Response
The response returned by the heapSnapshot method is an instance of Saloon\Http\Response. You can send the resulting file to the developers or open about://inspect in Chrome to analyze the heap.
php
/** @var \Saloon\Http\Response $heap */
$heap->status(); // 200
$heap->body(); // Binary content of the heapsnapshotEngines
| WEBJS | WPP | NOWEB | GOWS |
|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ |