Laravel

How do you monitor a Laravel application in production?

What to watch on a production Laravel server: Horizon and queue workers, the scheduler, PHP-FPM pools, laravel.log errors, MySQL and Redis.

In short

Monitoring Laravel in production means watching five layers: the queue workers and Horizon, the scheduler heartbeat, the PHP-FPM pool and nginx, laravel.log error patterns, and the MySQL and Redis behind them. Opservo detects all five automatically on any Linux server, clusters laravel.log into plain-English summaries, and names the slow query or failing job from real data.

Which parts of Laravel fail silently?

  • •Queue workers and Horizon: a supervisor restart loop or an exhausted memory limit leaves jobs unprocessed with the site apparently fine
  • •The scheduler: if the cron entry stops, every scheduled command stops, and nothing errors
  • •PHP-FPM: an exhausted pool (pm.max_children) shows as slow pages and 502s from nginx, not as a crash
  • •laravel.log: a new exception class repeating every minute is the earliest sign of a bad deploy
  • •MySQL and Redis: a missing index, a slow query after a data growth spike, or Redis hitting maxmemory with the wrong eviction policy

What does the agent detect automatically?

Opservo finds Laravel applications by their filesystem layout and process list, then watches the systemd units and processes running workers and Horizon, the nginx or Apache virtual host with its SSL expiry, the PHP-FPM pool, laravel.log and the nginx error log, and MySQL and Redis on the same host or in containers. No configuration and no reading of the .env file: the agent never opens application secrets.

How do you catch the scheduler stopping?

Use a heartbeat monitor: a URL the scheduler pings on every run. If the ping stops arriving, Opservo alerts. Add it as a scheduled command:

$schedule->call(fn () => Http::get(config('services.opservo.heartbeat')))->everyFiveMinutes();

Heartbeat monitors are included on the Free plan and work for any cron job, backup script or worker, not only Laravel.

How do you find out why a Laravel page is slow?

Ask. Opservo’s chat is grounded in the server’s live facts: PHP-FPM pool usage, MySQL slow-log patterns with literals stripped, Redis fragmentation and rejected connections, the log clusters from the last hour and what changed. The answer names the pattern, for example a query without an index on a table that grew, and gives the command or migration to fix it. Resolve-with-AI can run the fix with approval on servers where remote actions are enabled.

What should page a human?

  • •Horizon or a queue worker unit down, or in a restart loop
  • •The scheduler heartbeat missed
  • •PHP-FPM pool exhausted, or nginx returning 502s on the external check
  • •A new error pattern in laravel.log recurring more than a set number of times
  • •Disk forecast to fill within 7 days, usually laravel.log or storage/logs itself
  • •MySQL connections near max, or Redis at maxmemory with noeviction

Last updated 2026-09-23.

FAQ

Related questions

Does Opservo need a Laravel package installed?+

No. The server agent detects Laravel and its services from the outside. The only optional in-app change is a heartbeat ping from the scheduler.

Does Opservo read my .env or database credentials?+

No. The agent never reads .env files. MySQL and Redis are inspected via local socket status commands; Postgres via the postgres OS user. An optional read-only connection string can be provided for a remote database.

Does it work with Laravel Forge or Ploi servers?+

Yes. Forge provisions and deploys; Opservo monitors, explains and fixes on the same server. See the Laravel Forge alternative page for the split.

Can it monitor Laravel in Docker?+

Yes. Containers are discovered from the Docker socket, their logs are clustered, and MySQL or Redis running as containers are inspected with docker exec.

What does monitoring a Laravel application in production actually cover?+

Laravel monitoring in production typically covers several layers: the web server handling requests (nginx or Apache), the PHP process manager (PHP-FPM), the application queue workers, scheduled artisan commands, Redis or database connections, and the underlying server resources like CPU, memory, and disk. You should also track SSL expiry, error log spikes, and slow queries. Opservo auto-discovers Laravel apps and monitors all of these layers together, grouping related log noise into AI-summarised clusters and alerting you when queue workers stop, disk is on track to fill, or a cron heartbeat goes silent.