Why a SuiteCRM Messenger worker needs its own process
If your self-hosted SuiteCRM 8.10 team sees background tasks stall, such as queued jobs that never finish or emails and imports that sit unprocessed, the likely cause is that nothing is consuming the message queue. The SuiteCRM Messenger worker is the long-running messenger:consume process that picks up those queued background messages and runs them. You need to supervise it with a process manager whenever you run SuiteCRM 8 on your own servers, because a worker started once in a terminal stops when that session ends and nothing restarts it after a reboot or crash.
The worker is a long-running command, not a scheduled job. It must run as the same user that runs the web server, so files it writes, such as generated documents, cache entries and uploaded media, carry the ownership the web application expects. Once the worker runs under a process manager, you choose between Supervisor, systemd or a cron-driven approach, and this page covers each of those options along with time and memory limits. The sibling page on the SuiteCRM scheduler covers the separate cron entry for schedulers:run, so keep the two responsibilities distinct in your runbook.
Keep to a single worker unless SuiteCRM's documentation for your exact release tells you otherwise. Several consumers reading the same queue can process the same message twice or compete for locks, and the behavior of that setup is something to confirm with the SuiteCRM documentation and a staging test rather than assume. Before you go live, ask your team to confirm which queue transport your build uses, how the worker reports its state, and how the process manager will alert someone when it stops. Those answers decide how much of this page you need to implement.
Choosing Supervisor, systemd or cron for messenger:consume
Supervisor suits a host that runs several PHP applications or other background processes, because it gives one place to define, start, stop and inspect each program. A SuiteCRM worker is defined as a program that runs the messenger consumer as the web server user, and Supervisor restarts it if it exits. Supervisor is usually installed and configured by the platform team, so the team that owns the host usually owns the worker too, which should be agreed in writing.
- Restart behavior: Supervisor can restart the process on exit and back off after repeated failures. Confirm the retry count and the delay so a broken worker does not restart in a tight loop.
- Logging: Supervisor captures standard output and error into files you name. Set rotation so the worker log does not fill the disk.
- Ownership: The platform team typically controls the Supervisor configuration, while the SuiteCRM administrators need read access to the logs.
- Shared host risk: Other programs on the same host share the same user, memory and CPU, so set limits per program.
- Control: Restart and status checks are run through
supervisorctl, which operations staff should be able to use during an incident.
Before relying on Supervisor, confirm the exact command, its options and the process user against the SuiteCRM 8.10 documentation for your installed version.
systemd suits a dedicated or single-application Linux server where the operating system already manages services. The worker runs as a unit, is enabled at boot and is controlled with the same tools used for the web server and database. For many teams this is the least additional software to operate, but it depends on the distribution's systemd version and the unit settings chosen.
- Restart behavior: The unit can set a restart policy and a restart delay. Confirm that the policy restarts the worker after failures but does not hide a crash loop from monitoring.
- Logging: Output usually goes to the systemd journal. Confirm the retention and size limits for the journal and who can read it.
- Ownership: The server administrators own the unit file, while the SuiteCRM owners need to agree on the user, working directory and environment file.
- Boot order: Make sure the unit starts after the database and web server are available, or it will fail at startup.
- Control: Use
systemctl statusandjournalctlto check health, and record who is permitted to restart the unit.
Confirm the consumer command, its options and the web server user against the SuiteCRM 8.10 documentation for your installed version before writing the unit file.
Cron is a fallback for hosts where neither Supervisor nor systemd is available or permitted, such as some shared or tightly managed environments. A cron entry can start the consumer on a schedule, but cron does not supervise a running process, so the team must design how the worker is kept alive and avoid duplicate workers. Because this approach has the fewest built-in safeguards, it needs the most explicit monitoring.
- Restart behavior: Cron does not restart a crashed worker. Any recovery depends on a scheduled check or on the worker exiting cleanly and being started again.
- Duplicate processes: Without a lock, repeated cron runs can start more than one consumer. Confirm how the entry prevents overlap and keep a single worker as the goal.
- Logging: Redirect output to a file that the web server user can write and that rotates. Cron itself does not manage logs.
- Ownership: The web server user should own the entry so that file permissions match the SuiteCRM install.
- Verification: Confirm from the SuiteCRM interface that queued tasks are being processed, since cron success alone does not prove background work is moving.
Before choosing cron, confirm the exact invocation and scheduling guidance in the SuiteCRM 8.10 documentation for your installed version, and check whether your hosting provider allows the entry.
Configuration options and when each fits
This table compares Supervisor, systemd and cron for keeping messenger:consume running, covering restarts, logs, run-as user, operator visibility and typical fit. Read the rows for worker count and limits last, since they decide whether the chosen process manager is safe for your background queue.
| Setting | Supervisor | systemd | Cron |
|---|---|---|---|
| Restart on failure | Restarts the worker process automatically when it exits, if autorestart is configured | Restarts the service automatically when it exits, if Restart= is set in the unit file | Does not keep a process running; a cron entry only starts a command at scheduled times, so a crashed consumer stays down until the next run |
| Log handling | Captures stdout and stderr to log files you name in the program configuration | Sends output to the journal by default; confirm retention and forwarding with your logging setup | Output goes wherever the cron entry redirects it, so redirection must be set explicitly |
| Run-as user | Runs the program as the user set in its configuration, typically the web server user | Runs the service as the user set in the unit file, typically the web server user | Runs as the user whose crontab holds the entry, so the entry must be added under the web server account |
| Operator visibility | Status is shown with supervisorctl, which gives a quick view of each process | Status is shown with systemctl and journalctl, which fit teams already using systemd for other services | Little built-in visibility; operators must check log files or process lists themselves |
| Typical fit | Dedicated hosts where a process manager is already in use and operators want a simple status view | Modern Linux servers where systemd manages the other services and centralized journal logs are standard | Small or test installs where a long-running consumer is not required and an external check can restart it |
| Time limit setting | Set the consumer's runtime limit in the command or your team's own wrapper; confirm the supported option with SuiteCRM for your version | Set runtime limits through unit file options such as RuntimeMaxSec only after confirming the consumer's own limit behavior | Set limits through the command or a wrapper script; cron does not stop a running consumer by itself |
| Memory limit setting | Confirm the PHP memory_limit used by the CLI and any process-level limit you add in the program configuration | Use MemoryMax in the unit file to cap resident memory, and confirm the PHP limit for the CLI separately | Set the PHP CLI memory limit and any OS-level limit in the wrapper; cron has no built-in memory control |
| Single worker versus multiple workers | One worker is the default approach; do not raise numprocs without confirming with SuiteCRM first | Use one service instance; do not start additional consumers without confirming with SuiteCRM first | Multiple cron-started consumers can overlap; do not add parallel consumers without confirming with SuiteCRM first |
How to set up the worker as the web server user
This sequence takes a SuiteCRM 8.10 host from a verified install to a supervised messenger:consume process that runs as the web server user, with a tested background task to prove messages are being consumed.
Confirm the SuiteCRM 8.10 and PHP CLI versions
Check the installed SuiteCRM 8.10 release and run the PHP command-line binary that cron and the process manager will call, not only the version Apache loads. Compare both against the SuiteCRM 8 compatibility matrix, which lists PHP 8.2, 8.3 and 8.4 for 8.10. Run
php -vas the web server user and confirm the same major and minor version appears. Done when the CLI version appears in the matrix and matches the version the web server uses, because a mismatch here is a common reason the worker starts and then fails silently.Confirm the web server user and file ownership
Identify the user the web server runs as, commonly www-data on Debian and Ubuntu or apache on RHEL-family systems, and confirm it on your host rather than assuming it. Check that this user can read the whole SuiteCRM directory and can write to the cache, logs and upload paths the application uses. Use
ps aux | grep -E 'apache|httpd|php-fpm'andls -ldon the SuiteCRM directory to confirm. Done when the worker user can write to the var and cache paths and cannot be locked out by a root-owned file created during install. Ask your team to record this user, because the process manager configuration in the next step must match it exactly.Write the process manager configuration
Create a configuration that runs messenger:consume as the web server user from the SuiteCRM directory. In Supervisor, this is a program block with
user=set to the web server user anddirectory=set to the SuiteCRM root. In systemd, it is a unit file withUser=andWorkingDirectory=set the same way. Set the command to the messenger:consume invocation documented for your SuiteCRM 8.10 install, and direct stdout and stderr to a log file the web server user can write. Keep a single worker process in this configuration. Done when the file parses without errors (supervisorctl rereadorsystemd-analyze verify) and the user and directory values match what you confirmed in the previous step.Start the process and confirm it is running
Load the configuration and start the worker, then confirm the process owner. Run
supervisorctl statusorsystemctl statusfor the unit, and check withps -o user,cmd -C phpthat the messenger:consume process runs as the web server user, not root. Watch the log file for startup output and any fatal error about database connection, missing environment variables or permissions. Done when the status reads running, the process owner is the web server user, and the log shows the consumer waiting for messages without errors.Verify consumption with a test background task
Trigger a background task that goes through the messenger queue, such as an action your team can safely run on a test record in a staging or non-production instance. Watch the log file and the queue table or transport your install uses until the message is picked up and the task completes. Record the time from trigger to completion as a baseline for later checks. Done when the test task completes, the log shows it was handled by the worker, and the queue has no leftover message from the test. If the message remains queued, check user permissions, the working directory and the environment file before going further.
Roll back to the previous state before enabling restarts
Before you turn on automatic restart, prove you can remove the worker cleanly. Stop the process with
supervisorctl stoporsystemctl stop, confirm no messenger:consume process remains inps, then remove or disable the configuration and reload the manager. Restore the previous cron or manual state if you had one, and confirm the application still loads in the browser. Done when the removal leaves no orphaned process and the site still works, so you know a bad configuration can be backed out during an incident.Enable restart policies and recheck ownership
Turn on the restart behavior your process manager provides, such as
autorestart=truein Supervisor orRestart=on-failurein systemd, with a restart delay that avoids a tight crash loop. Reload the configuration, restart the worker once, and repeat the test background task from the verification step. Then confirm the process owner again and check the log for the restart. Done when the worker recovers after a controlled stop, the test task completes again, and the owner is still the web server user. Record the configuration path and the log location in your runbook so on-call staff can find them.
Setting time and memory limits without stopping background work
The memory limit and the process time limit that suit a web request can stop a Messenger worker in the middle of its job. A web request starts, does its work and ends, so PHP's defaults rarely matter for long. A messenger:consume process stays alive for hours or days, handles many messages in sequence, and accumulates memory from each one. Any PHP limit that applies to the CLI process will eventually apply to the worker. Check the CLI php.ini that the worker actually uses, since it can differ from the one behind Apache or PHP-FPM, and confirm the values with php -i run as the web server user.
Restart policy is what turns a limit into a healthy worker or a restart loop. Supervisor's autorestart and systemd's Restart= setting bring the process back after it exits, so a memory or time limit that ends the process is recovered automatically, but the messages it was handling may be retried or delayed. Set the limit so that a planned recycle happens between jobs, and make sure the restart policy does not hide a worker that dies on every start. Watch memory growth over time in the worker's log and in host metrics. A steadily rising footprint after each batch points to a leak or to a customization that holds references, and the answer is a code fix, not a higher ceiling.
Set limits deliberately and write the chosen values down with the reason for each. This page does not give numeric defaults for memory or time, because the right values depend on your message volume, your customizations and your host. Confirm what the SuiteCRM 8.10 documentation recommends for the worker, then test with a representative message load on a staging instance and record peak memory per run. Ask your implementation partner or internal team to document the limits, the restart behavior and the log lines used to detect growth, so the values are reviewed again at each SuiteCRM minor upgrade.
Security and operational considerations for the worker
The Messenger worker runs unattended, reads the same configuration as the web application and writes logs that can expose data. The cards below cover the decisions that keep it safe to run and easy to check: who it runs as, what it can read, how it is watched, and how it is kept current with SuiteCRM and PHP.
Run as the web server user
Start messenger:consume as the same user that serves SuiteCRM, typically the web server account on your distribution, so the worker can read and write the files the application uses. Do not run it as root to avoid permission errors, because a root process that writes cache or media files leaves files the web server cannot change later. Check with ps that the worker runs under the expected account after every restart. Confirm the account name with your distribution and web server before you write the unit or program file.
Protect .env.local and secrets
The worker reads the same .env.local file as the web application, so it also reads database credentials, mailbox settings and any storage keys. Restrict that file to the web server account with read-only permissions, keep it out of version control and avoid putting secrets directly into Supervisor or systemd unit files, where they show up in process listings and configuration reviews. Use the same secret handling for the worker and the web tier. Confirm where storage credentials are stored if you use S3 or Azure Blob Storage.
Control log access and retention
Supervisor and systemd capture the worker's standard output and errors, and those logs can include record identifiers, email subjects and error traces. Limit read access to the operations group, set a rotation policy so logs do not fill the disk, and decide how long logs are kept in line with your data retention rules. Ask your security team whether worker logs fall within the same retention and access controls as the application logs.
Monitor that the worker is alive and consuming
A worker can stay running while it stops processing queued messages, so a process check alone is not enough. Alert on the process being down, and also on the queue growing or on no messages being handled over a period you define with your business owners. Use the scheduler checks in the SuiteCRM admin tools alongside process monitoring, and confirm the alert reaches a team that can act on it outside business hours.
Patch SuiteCRM and PHP together
The worker loads the same SuiteCRM code and PHP runtime as the web application, so a patch to one must be applied to the other and the worker must be restarted afterward. SuiteCRM 8.10 supports PHP 8.2, 8.3 and 8.4, so confirm the PHP binary the worker calls is one of those versions. Patch releases contain only security and bug fixes, so plan to apply them on your normal change window. Test on a staging instance first.
- Supported PHP versions
- 8.2 to 8.4
Restrict access to the process manager
Anyone who can edit a Supervisor program file, run supervisorctl, or change a systemd unit can run commands as the worker account. Limit those permissions to named administrators, keep the unit or program files owned by root and review changes through your normal change process. Protect the Supervisor control socket or systemd administrative rights the same way as other production access, and record who restarted the worker and when.
How the Messenger worker fits with the web server and scheduler
Requests from users reach Apache and SuiteCRM, which write queued background messages to the database. A process manager keeps the messenger:consume worker running as the web server user, and it reads the same messages from the database. The scheduler cron entry runs separately, and logs from all three flow to the operator. Check that the worker is alive, that it runs as the same user as the web tier, and that the trust boundary between the web tier and the database is enforced by network rules and credentials.
Web tier requests queue work that a supervised worker drains from the database.
Questions teams ask about running the SuiteCRM Messenger worker
How much does running the Messenger worker cost internally compared with a partner?
No public price applies to this work, so the cost depends on who does it and how much of the job is already covered by your team's Linux and PHP operations. Internally, the cost is staff time for the initial setup, testing on staging, writing the runbook, and ongoing checks after each SuiteCRM release. With a partner, the cost is the fixed-scope fee for the written scope, which covers the same steps plus handover documentation. One-time work includes the initial configuration and testing. Recurring work includes watching the worker after upgrades and handling restarts. The main cost drivers are the number of environments, the process manager you choose, and whether your monitoring already alerts on a stopped background process. Ask each option for its hours, its deliverables, and its handover steps before comparing them.
How long does a typical Messenger worker setup take?
The duration depends mainly on how many environments you run, whether a process manager is already in use, and how much testing your change process requires. A team with an existing staging instance and a working Supervisor or systemd pattern can usually move faster than a team building that pattern from scratch. Plan time for the configuration, a test that proves queued messages are processed after a restart, a test after a server reboot, and a short runbook for operations staff. SuiteCRM 8.10.2 was published on July 31, 2026, and minor 8.x releases arrive roughly every eight weeks, so the setup will be checked again within a regular release cycle. Ask any partner for its estimated timeline and the assumptions behind it, and confirm those assumptions against your own environment.
What skills does our team need to run the Messenger worker?
Your team needs Linux access with rights to create a service definition, a clear idea of which user the web server runs as, and enough PHP and database knowledge to read errors from the worker's log. Staff should understand how the worker connects to the SuiteCRM application and the database, and how to check whether queued messages are draining. You also need a staging instance that matches production closely enough to test restarts, memory limits, and time limits before a change goes live. The SuiteCRM migration documentation recommends testing on a staging instance, backing up files and the database, and reviewing customizations first, and the same discipline applies to worker changes. Confirm the PHP and database versions you run are supported by the compatibility matrix for your SuiteCRM version before you start.
Can our team set up the Messenger worker alone using the documentation?
A team with Linux and PHP experience can usually set up the worker alone, provided it tests the result on staging before production. The documentation covers the command to run and the basic requirements, but your team still has to choose a process manager, pick a service user, set time and memory limits that fit your server, and decide how failures are reported. The gaps that usually cause trouble are unclear restart behavior, log growth, and no alert when the worker stops. Write down each decision in a runbook so the next person can operate the setup. If your team lacks one of these skills, a partner can cover the gap through a written scope with defined deliverables. Either way, verify the result by sending a test message through SuiteCRM and checking that it is processed.
Why does SuiteCRM recommend running a single Messenger worker?
Running one worker keeps the order and handling of background tasks easier to predict, and it makes failures easier to find. When several consumers read the same queue, the same task can be handled more than once or handled in an unexpected order, and troubleshooting becomes harder because each process has its own log and state. A single worker under one process manager also gives you one service to watch, restart, and alert on. Confirm the exact guidance in the SuiteCRM 8.10 documentation for your version and your deployment model before you change the worker count. If you find that your workload needs more capacity, treat that as a design change to plan and test on staging, not a quick edit to the service file.
How do we confirm the Messenger worker survives a SuiteCRM upgrade?
Test the worker on staging with the new SuiteCRM version before you upgrade production, then repeat the same checks after the production upgrade. Patch releases contain only security and bug fixes and no database changes, while minor releases can include more change, so the checks should be the same but the review effort may differ. The checks are: the process manager reports the worker as running, a test message is processed, the worker restarts cleanly after a server reboot, and the logs show no new errors. Keep the worker configuration in version control so you can compare it after an upgrade. Record the results in your change ticket so the next upgrade starts from a known state.
What should we ask for in a quote for this work?
Ask for a written scope that names the SuiteCRM version, the operating system, the PHP and database versions, and the process manager to be used. Confirm which environments are covered, including staging and production, and whether the partner will test restarts, reboots, and an upgrade path. Request the deliverables in writing: the service definition or Supervisor configuration, a runbook, the test evidence, and the handover session. Ask how monitoring and alerting are handled, what happens if the worker fails after handover, and whether ongoing support or retesting is available as a separate retainer. DeployOpen works in fixed-scope engagements, and a quote follows from the written scope rather than from a published price list, so the more precise the scope, the more precise the quote.
How DeployOpen works on this
DeployOpen plans, builds, tests and documents SuiteCRM worker setup inside your own infrastructure, so the Messenger worker runs under a process manager you can review and operate. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.
How we scope
- Confirm your SuiteCRM 8.10 version, PHP version, web server user and whether the worker runs on the web host or a separate one.
- Choose Supervisor, systemd or cron based on your host standards, and record the decision and its trade-offs in the written scope.
- Agree the time and memory limits, log locations and alerting that the worker setup will include before build work begins.
How we build
- Create the messenger:consume unit or program definition to run as the web server user, with restart behavior and logging set in configuration.
- Test queued background jobs end to end on a staging instance, including restart after a reboot and after a failed job.
- Confirm the single worker setup holds, then verify that scheduled tasks and queued jobs keep moving under normal load.
How we hand over
- Deliver configuration files, a runbook with start, stop, status and log commands, and a short check list for your operations team.
- Walk your administrators through restarts, upgrade steps and what to check when background tasks stop processing.
- Record the final configuration, versions and test results so your change management and audit records reflect what was deployed.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, including worker reviews after each SuiteCRM minor release.
- Re-verify the worker configuration when PHP, the web server or the operating system is patched or replaced.
- Ask for a quote based on the written scope, which should state what is one-time setup and what recurs under a retainer.

