Jobs
Published
Updated
🛠️
Heavy lifting, off the main stage.
The Jobs component runs workers and crons in a container of their own, next to the web requests of a fortrabbit environment. Its plans set the memory and the number of jobs. Heavy tools such as ffmpeg run here.
Jobs is an optional component, booked and scaled per environment. Higher plans add memory and more jobs.
┌─────────┐ ┌──────────────┐ ┌─────────────┐
│ visitor │ ◀─ Request/response ─▶ │ environment │ ◀──▶ │ worker/cron │
└─────────┘ └──────────────┘ └─────────────┘
Jobs run in their own container, with the same file system, database, ENV vars and settings as the environment. Heavy work in a job does not slow down the web requests.
Job types
Laravel, Symfony, Craft CMS and Statamic all use queues and schedules. Set up jobs in the dashboard, see jobs usage.
Scaling
The jobs memory metric shows whether the plan fits. All jobs share the memory of the plan, see jobs tuning.
Performance
Signs that jobs need attention:
- Crons overlap because runs do not finish in time
- Jobs are killed for lack of memory
Before scaling up, check the code and the schedules.
Extended binaries
These tools are installed for jobs only, not for web requests or SSH:
- ffmpeg
- Chromium and ChromeDriver
- Ghostscript
- cwebp and other WebP tools
- jpegoptim, optipng, pngquant, gifsicle
- brotli