24/7 Magento, server & cloud support · USA · UK · Europe · Middle East · Asia hello@scripulse.com
Magento11 min read

Magento 2 Production Troubleshooting Guide: Errors, Cron, Indexers and More

Diagnose Magento 2 production issues: 500 and 503 errors, cron, indexers, queues, OpenSearch, Redis, MySQL locks and disk problems.

When a Magento 2 store misbehaves in production, the fastest path to a fix is a consistent checklist that covers both the application and the infrastructure. These are the checks our support engineers run first.

Start with the logs

  • var/log/exception.log and var/log/system.log for application errors.
  • var/report/ for error reports. The browser shows a report ID; the matching file contains the stack trace.
  • Web server and PHP-FPM error logs for fatal errors, timeouts and “max children reached”.
  • Your APM (New Relic, Sentry, Datadog) for traces of slow or failing requests.

HTTP 503: maintenance mode or back-end failure

bin/magento maintenance:status

A leftover var/.maintenance.flag after a failed deployment is common. If maintenance is off, a 503 from Varnish or a load balancer usually means the PHP back end is unavailable or timing out.

HTTP 500 after a deployment

  • Check deploy mode: bin/magento deploy:mode:show.
  • Confirm setup:upgrade, setup:di:compile and setup:static-content:deploy completed for the release.
  • Check file ownership and permissions for var/, generated/ and pub/static/.
  • Look for PHP version or extension mismatches between CLI and FPM.

Cron is not running

Many Magento problems — stale prices, stuck orders, emails not sending, indexers falling behind — trace back to cron. Check the crontab for the Magento user, then the schedule table:

SELECT job_code, status, COUNT(*) FROM cron_schedule
WHERE scheduled_at > NOW() - INTERVAL 1 HOUR
GROUP BY job_code, status ORDER BY 3 DESC;

Many missed or old running rows indicate cron is not executing or jobs are hanging.

Indexers stuck or invalid

bin/magento indexer:status
bin/magento indexer:show-mode

Large catalogs should generally use “Update by Schedule”. Indexers stuck in “processing” often follow a killed process; investigate why before resetting them.

Message queue consumers

bin/magento queue:consumers:list

If consumers are not running (via cron or a process manager), asynchronous operations such as bulk actions and some inventory updates will not complete.

Search and catalog pages failing

curl -s localhost:9200/_cluster/health?pretty

A red or unreachable OpenSearch cluster breaks search and category pages. A cluster that hits its disk flood-stage watermark makes indices read-only. See our OpenSearch optimisation guide.

Redis problems

redis-cli info memory
redis-cli info stats | grep evicted

Evictions in the session database can log customers out; a full cache instance reduces hit rates and increases load.

Database locks and slow queries

SHOW FULL PROCESSLIST;
SHOW ENGINE INNODB STATUS\G

Look for long-running queries and the latest deadlock section. Deadlocks during checkout or indexing often involve custom code or extensions.

Disk space and inodes

df -h
df -i

Logs, reports, sessions and old releases fill disks quickly. A full disk causes failures that look unrelated, from session errors to MySQL crashes.

After the fix

Record the timeline, root cause and fix, and add monitoring so the same failure is detected earlier. Most repeat incidents in Magento come from cron, queues, disk and unmonitored integrations.

Need Magento production support?

Our Magento engineers and SREs diagnose application and server issues together. Get Magento support →

S
Scripulse Engineering Team
Written and reviewed by our Magento, Linux, SRE, cloud and security engineers. About our team.
Let’s talk

Need a reliable engineering partner for your platform?

Tell us what you need. A senior engineer will reply within one business day with a clear next step.

Book a free audit →