# Reset Sticky Database Connections Between Laravel Queue Jobs

DevFeed: [Reset Sticky Database Connections Between Laravel Queue Jobs](<https://devfeed.tech/articles/reset-sticky-database-connections-between-laravel-queue-jobs-95828.md>)

Original publisher: [Read original article](<https://laravel-news.com/laravel-queue-sticky-database-connections>)

Author: Paul Redmond

Published: 2026-10-21T22:24:26Z

Content type: article

Language: en

Sources: [Laravel](<https://devfeed.tech/sources/laravel.md>)

Topics: [Laravel](<https://devfeed.tech/topics/laravel.md>), [read-replica](<https://devfeed.tech/topics/read-replica.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [job](<https://devfeed.tech/tags/job.md>), [jobs](<https://devfeed.tech/tags/jobs.md>), [laravel](<https://devfeed.tech/tags/laravel.md>), [laravel-tutorials](<https://devfeed.tech/tags/laravel-tutorials.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [php](<https://devfeed.tech/tags/php.md>), [queue](<https://devfeed.tech/tags/queue.md>), [read-replicas](<https://devfeed.tech/tags/read-replicas.md>), [redis](<https://devfeed.tech/tags/redis.md>), [replica](<https://devfeed.tech/tags/replica.md>), [sticky](<https://devfeed.tech/tags/sticky.md>), [worker](<https://devfeed.tech/tags/worker.md>)

## AI overview

Laravel 13.36 adds the opt-in `Worker::$flushStickyConnections` flag to clear the sticky read/write state on every open database connection before a queue worker takes its next job. This lets later jobs send reads to replicas again, while reads after a write within the same job still use the write server. The flag is off by default; enabling it can affect jobs that rely on an earlier job's write reaching replicas, so check such dependencies. With the `database` queue driver, reserving a job updates the `jobs` table; if it shares the application data connection, that update sets the sticky flag again and jobs still read from the write server. Setting `DB_QUEUE_CONNECTION` to a separate connection avoids that interaction. Redis and SQS do not write to the database. Other long-running code can reset the flag with `forgetRecordModificationState()`.

## Source excerpt

Laravel 13.36 adds Worker::$flushStickyConnections so queue jobs go back to your read replicas after an earlier job writes to the database. The post Reset Sticky Database Connections Between Laravel Queue Jobs appeared first on Laravel News. Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.