Reverb breaks an assumption most Laravel monitoring is built on: that work happens inside a request and ends when the response is sent. A WebSocket connection can stay open for hours, a worker process can run for days, and "success" means a message reached a socket rather than that something returned a 200. None of that shows up in a request-oriented dashboard, which is why Reverb needs its own monitoring lens, and why request-based APMs only see the dispatch side, not the delivery side.
Why Reverb doesn't fit normal APM
Reverb is a long-running ReactPHP process serving WebSocket connections. It doesn't handle HTTP requests in the usual sense. APMs that record per-request telemetry see the Laravel side of broadcasting (the request that calls broadcast(), and the queued job that sends it to Reverb) but not the WebSocket-side message delivery, connections, or per-client state.
You need two layers:
- Laravel side (dispatch): your normal APM sees the request that broadcasts and, for queued broadcasts, the job that sends the event to Reverb
- Reverb worker side (delivery): process-level monitoring: memory, connections, throughput, errors
Reading Reverb's metrics
Reverb has no stats endpoint or Prometheus exporter. It ships two Laravel Pulse recorders instead, one for connections and one for messages:
config/pulse.php
'recorders' => [
\Laravel\Reverb\Pulse\Recorders\ReverbConnections::class => [
'sample_rate' => 1,
],
\Laravel\Reverb\Pulse\Recorders\ReverbMessages::class => [
'sample_rate' => 1,
],
// ...
],
Add the <livewire:reverb.connections /> and <livewire:reverb.messages /> cards to your Pulse dashboard to chart them. For a point-in-time count you can forward to another tool, Reverb answers the Pusher-compatible HTTP API. The Pusher PHP SDK behind Laravel's reverb broadcaster signs the requests for you:
use Illuminate\Support\Facades\Broadcast;
$pusher = Broadcast::connection('reverb')->getPusher();
$connections = $pusher->get('/connections'); // GET /apps/{app_id}/connections
$channels = $pusher->get('/channels'); // GET /apps/{app_id}/channelsDetecting memory leaks
Reverb workers are long-lived. Leaks accumulate slowly until the process OOMs or degrades:
Supervisor config
[program:reverb]
process_name=%(program_name)s
command=php /home/forge/app.com/artisan reverb:start
autostart=true
autorestart=true
user=forge
stdout_logfile=/home/forge/.forge/reverb.log
stopwaitsecs=3600
; Supervisor has no memory limit setting. Recycle the process
; with php artisan reverb:restart instead (see below).
Schedule php artisan reverb:restart (nightly, for example) as a leak safety net. Reverb closes its connections gracefully, the process exits, and Supervisor starts a fresh one. Run the same command on deploy so Reverb picks up new code.
Tracking broadcast dispatch from Laravel
A queued broadcast runs as an Illuminate\Broadcasting\BroadcastEvent job, which is why NightOwl shows it on the Jobs page (listed under your event's class name, since that's the job's display name). BroadcastEvent is a job, not an event, so Event::listen on it never fires. Hook the queue events and filter for it instead:
app/Providers/AppServiceProvider.php
use Illuminate\Broadcasting\BroadcastEvent;
use Illuminate\Queue\Events\JobProcessed;
use Illuminate\Support\Facades\Event;
public function boot(): void
{
Event::listen(function (JobProcessed $event) {
if (($event->job->payload()['data']['commandName'] ?? null) !== BroadcastEvent::class) {
return;
}
logger()->info('Broadcast sent to Reverb', [
'event' => $event->job->resolveName(),
'queue' => $event->job->getQueue(),
]);
});
}
Broadcasts that implement ShouldBroadcastNow skip the queue and are sent during the request, so they don't produce a job record.
Scaling Reverb horizontally
Multiple Reverb processes coordinate via Redis pub/sub. Monitor both:
- Redis pub/sub channel subscribers (should match Reverb process count)
- Redis availability (Redis relays messages between Reverb servers and doesn't buffer them, so a Redis outage stops cross-server delivery)
- Per-process connection distribution (load balancer should spread evenly)
Alerting thresholds
| Signal | Alert threshold |
|---|---|
| Active connections per app | > 80% of the app's max_connections |
| Memory per process | > 2x baseline, sustained 1h |
| Failed broadcast jobs | any, investigate |
| Worker crashes | any, investigate |