Magento 2 AI Review TranslatorMagento 2 AI Review Translator
Live Demo
Buy Now
Support
Live Demo
Buy Now
Support
  • Getting Started

    • Introduction
    • Key Features
    • How It Works
  • Installation

    • Requirements
    • Install the Module
    • Install the AI Packages
    • Enable & Compile
    • Verify the Installation
    • Content Security Policy
    • Translating the Interface
  • Setup

    • Enable the Module
    • Activate Your Licence
    • Select an LLM Provider
    • Validate & Load Models
    • First Translation
  • Configuration

    • Overview
    • General Settings
    • Limits & Timeouts
    • Store Views & Languages
    • Admin Menu
    • Access Control
  • LLM Providers

    • Provider Overview
    • How Validation Works
    • Choosing a Model
    • Switching Providers
  • Ollama (Self-Hosted)

    • Install Ollama
    • Connect to Magento
    • Timeouts & Batch Size
    • Troubleshooting
  • Translating Reviews

    • Translation Basics
    • What Is Sent to the Model
    • Fallback Behaviour
    • Automatic Translation
    • The Queue Consumer
    • Running the Consumer
    • Bulk CLI Command
    • Batch Size
    • CLI Output & Exit Codes
  • Storefront

    • On the Storefront
    • The Toggle
    • Styling
  • Developers

    • GraphQL API
    • Querying from Code
    • Data Model
    • Useful SQL
  • Help

    • Setup Problems
    • Translation Problems
    • Queue Problems
    • Storefront Problems
    • FAQ

Running the Consumer

A manual queue:consumer:start exits after 5000 messages and dies with your SSH session. Pick one of these three for anything beyond a test.

Option A — Magento cron (simplest)

Magento's consumers_runner cron job starts declared consumers automatically. Check app/etc/env.php:

'cron_consumers_runner' => [
    'cron_run' => true,
    'max_messages' => 1000,
    'consumers' => [],   // empty = run every declared consumer
],

An empty consumers array runs all of them. If yours lists specific consumers, add 'aireview.translation.generate'.

Then make sure Magento cron itself is installed:

php bin/magento cron:install

Best default

If you have no strong reason to do otherwise, use this. It needs no extra process supervision and survives deploys.

Option B — Supervisor (best for busy stores)

[program:aireview_translation]
command=php /var/www/magento/bin/magento queue:consumer:start aireview.translation.generate --max-messages=1000
numprocs=1
autostart=true
autorestart=true
user=www-data
stdout_logfile=/var/log/supervisor/aireview_translation.log
stderr_logfile=/var/log/supervisor/aireview_translation_error.log
supervisorctl reread && supervisorctl update

Option C — systemd

[Unit]
Description=Magento AI Review Translator consumer
After=network.target mysql.service

[Service]
Type=simple
User=www-data
WorkingDirectory=/var/www/magento
ExecStart=/usr/bin/php bin/magento queue:consumer:start aireview.translation.generate --max-messages=1000
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable --now aireview-translation

Keep it to one process

More consumers will not make it faster

Translation is an outbound API call, not CPU-bound work. Parallel consumers mostly buy you provider rate-limit errors. Start with numprocs=1 and only add more if you have confirmed your provider's limits allow it.

Restart after configuration changes

The consumer caches configuration at start. After changing the provider, key, or model, restart it:

supervisorctl restart aireview_translation     # or
systemctl restart aireview-translation
Prev
The Queue Consumer
Next
Bulk CLI Command