This guide lists common issues you might encounter while installing, upgrading, or operating SourceMonitor, along with concrete steps to resolve them.
- Ensure the install generator added
mount SourceMonitor::Engine, at: "/source_monitor"(or your custom path) inside the hostconfig/routes.rb. - Restart the Rails server after modifying routes.
- Confirm your host application routes are reloaded (run
rbenv exec bin/rails routes | grep source_monitor).
- Run
rbenv exec bin/rails railties:install:migrations FROM=source_monitorfollowed byrbenv exec bin/rails db:migrate. - If you see duplicate migration timestamps, remove the older copy before rerunning the installer.
- For Solid Queue tables, verify the host database contains the
solid_queue_*tables shipped with the engine migration or runrbenv exec bin/rails solid_queue:installfor a dedicated queue database.
- Solid Queue metrics require the
solid_queuetables—see issue 2 above. - Ensure at least one Solid Queue worker is running; the dashboard reads visibility data via
SourceMonitor::Jobs::Visibility. - When using mission control integration, keep
config.mission_control_dashboard_pathpointing at a valid route helper; otherwise the dashboard hides the link.
- Symptoms: Fetch scheduling, scrape scheduling, and cleanup jobs never fire. Sources never auto-fetch on their configured intervals.
- Primary fix: Re-run the install generator, which automatically patches the dispatcher config:
bin/rails generate source_monitor:install
- Diagnostics: Run
bin/source_monitor verifyto check recurring task registration. The RecurringScheduleVerifier will report whether SourceMonitor recurring tasks are loaded into Solid Queue. - Manual check: Verify
config/queue.ymlincludesrecurring_schedule: config/recurring.ymlunder thedispatchers:section. Without this key, Solid Queue's dispatcher will not load the recurring schedule even thoughconfig/recurring.ymlexists. - Manual fix (if generator cannot patch):
dispatchers: - polling_interval: 1 batch_size: 500 recurring_schedule: config/recurring.yml
- Symptoms:
bin/devstarts the web server but jobs never run. Runningbin/rails solid_queue:startmanually works fine. - Primary fix: Re-run the install generator, which automatically patches
Procfile.dev:bin/rails generate source_monitor:install
- Diagnostics: Run
bin/source_monitor verifyto check Solid Queue worker status. The SolidQueueVerifier will suggest Procfile.dev if no workers are detected. - Manual check: Verify
Procfile.devincludes ajobs:line:jobs: bundle exec rake solid_queue:start - Most Rails 8 apps use foreman or overmind via
bin/dev. Without ajobs:entry, the process manager only starts the web server and asset watchers -- Solid Queue workers are not launched.
- Confirm Action Cable is mounted and
ApplicationCableclasses exist (see installation guide). - In production, verify WebSocket proxy settings allow the
/cableendpoint. - When switching to Redis, add
config.realtime.adapter = :redisandconfig.realtime.redis_urlin the initializer, then restart web and worker processes. - For Solid Cable, check that the
solid_cable_messagestable exists and that no other process clears it unexpectedly.
- Symptoms: Many sources show as overdue on the dashboard, especially after deploys or on sites with hundreds of sources.
- Thundering herd: If many sources became due simultaneously (e.g., after a queue stall), they overwhelm the scheduler's per-run batch size (default 25). Run the stagger task to spread them out:
bin/rails source_monitor:maintenance:stagger_fetch_times WINDOW_MINUTES=10
- Stuck "fetching" sources: The stalled fetch reconciler automatically resets sources stuck in "fetching" status after
config.fetching.stale_timeout_minutes(default 5 minutes). For manual recovery:bin/rails source_monitor:maintenance:recover_stalled_fetches
- Batch size too small: If you have hundreds of sources, the default batch size of 25 may cause a backlog. Increase via
config.fetching.scheduler_batch_size = 50in your initializer. - Queue separation: Ensure your
solid_queue.ymlincludes all three SourceMonitor queues (source_monitor_fetch,source_monitor_scrape,source_monitor_maintenance). Non-fetch jobs on the wrong queue can starve fetch processing.
- Review the most recent fetch log entry for the source; it stores the HTTP status, error class, and error message.
- Increase
config.http.timeoutorconfig.http.retry_maxif the feed is slow or prone to transient errors. - Supply custom headers or basic auth credentials via the source form when feeds require authentication.
- Check for TLS issues on self-signed feeds; you may need to configure Faraday with custom SSL options.
- Confirm the source has scraping enabled and the configured adapter exists.
- Override selectors in the source's scrape settings if the default Readability extraction misses key elements.
- Inspect the scrape log to see the adapter status and content length. Logs store the HTTP status and any exception raised by the adapter.
- Retry manually from the item detail page after fixing selectors.
- Pass numeric values for
FETCH_LOG_DAYSorSCRAPE_LOG_DAYSenvironment variables (e.g.,FETCH_LOG_DAYS=30). - Ensure workers or the console environment have permission to soft delete (
SOFT_DELETE=true) if you expect tombstones. - If job classes cannot load, verify
SourceMonitor.configureran before callingrake source_monitor:cleanup:*.
- System tests rely on Selenium + Chrome. Install Chrome/Chromium and set
SELENIUM_CHROME_BINARYif the binary lives in a non-standard path. - You can run
rbenv exec bin/test-coverage --verboseto inspect failures with additional logging.
- Mount
MissionControl::Jobs::Enginein your host routes (for example,mount MissionControl::Jobs::Engine, at: "/mission_control"). - Keep
config.mission_control_enabled = trueandconfig.mission_control_dashboard_pathpointing at that mounted route helper. CallSourceMonitor.mission_control_dashboard_pathin the Rails console to confirm it resolves. - When hosting Mission Control in a separate app, provide a full URL instead of a route helper and ensure CORS/WebSocket settings allow the dashboard iframe.
- Running
test/dummy/bin/devbefore configuring the bundling pipeline will serve the admin UI without Tailwind styles or Stimulus behaviours. This happens because the engine no longer ships precompiled assets; see.ai/engine-asset-configuration.md:11-44for the required npm setup. - Fix by running
npm installfollowed bynpm run buildinside the engine root so thatapp/assets/builds/source_monitor/application.cssandapplication.jsexist. The Rake taskapp:source_monitor:assets:buildwraps the same scripts for CI usage. - When the UI is still unstyled, confirm the dummy app can read the namespaced asset directories noted in
.ai/engine-asset-configuration.md:32-44and restartbin/devso the CSS/JS watchers reconnect.
- Symptoms: Fetch logs show HTML containing "Checking your browser" or "Just a moment..." instead of feed XML. The source may display a "Blocked" badge.
- How it works: SourceMonitor automatically detects Cloudflare challenge responses and attempts cookie replay with UA rotation on subsequent fetches. No configuration is needed -- this is enabled by default.
- If fetches remain blocked: Some sites employ aggressive bot mitigation that cannot be bypassed with cookie replay alone. In these cases:
- Try setting a custom
user_agenton the source's custom headers to match a specific browser. - Consider whether the site offers an alternative feed URL that is not behind Cloudflare.
- Check the fetch log's
error_categoryfield -- a value ofblockedconfirms Cloudflare detection triggered.
- Try setting a custom
Collect the following and open an issue or start a discussion:
- Engine version (
SourceMonitor::VERSION) - Host Rails version and Ruby version
- Relevant configuration snippet from
config/initializers/source_monitor.rb - Recent fetch/scrape log entries or stack traces
We track known issues and roadmap items in .ai/tasks.md; check the next slice to see if your problem is already scheduled.