Skip to content

🐛 BUG: max_batch_timeout is limited to 30 seconds in miniflare #7398

@Checkm3out

Description

@Checkm3out

Which Cloudflare product(s) does this pertain to?

Miniflare

What version(s) of the tool(s) are you using?

3.91.0

What version of Node are you using?

v22.3.0

What operating system and version are you using?

Mac Sonoma 15.1.1

Describe the Bug

Observed behavior

Please describe.
Follow - https://developers.cloudflare.com/queues/tutorials/web-crawler-with-browser-rendering/

'
Adding the max_batch_timeout of 60 seconds to the consumer queue is important because Browser Rendering has a limit of two new browsers per minute per account. This timeout waits up to a minute before collecting queue messages into a batch. The Worker will then remain under this browser invocation limit.
'

Try to wrangler dev but get error that 30 seconds is the max

Expected behavior

Please describe.
allow
[[queues.consumers]]
queue = "queues-web-crawler"
max_batch_timeout = 60

for
wrangler dev

Steps to reproduce

Please provide the following:

  • A minimal working subset of your worker code
  • A minimal working subset of your wrangler.toml
  • Commands used to start your local dev server, including custom env and cli args
  • Steps to be performed in the browser, curl commands, or a test we can run that reliably fails (at least a percent of the time)

A git repo we can clone and run a test suite on, or which has a README with step-by-step instructions, is even better. In this case, please use the field below to provide a link to the minimal repro.

https://github.com/cloudflare/queues-web-crawler/blob/7d9bd009881e26e852ae850d739a70837df0dd67/consumer/wrangler.toml

Hello, I am following your tutorial and git repo - https://github.com/cloudflare/queues-web-crawler/tree/master/consumer

It seems some of the instructions may be missing or outdated - but i am specifically having an issue with the maxBatchTimeout

[ERROR] Unexpected options passed to new Miniflare() constructor:

{
...,
workers: [
/* [0] */ {
...,
queueConsumers: {
queues-web-crawler: {
...,
maxBatchTimeout: 60,
^ Number must be less than or equal to 30
...,

Please provide a link to a minimal reproduction

https://github.com/cloudflare/queues-web-crawler/tree/master/consumer

Please provide any relevant error logs

[ERROR] Unexpected options passed to new Miniflare() constructor:

{
...,
workers: [
/* [0] */ {
...,
queueConsumers: {
queues-web-crawler: {
...,
maxBatchTimeout: 60,
^ Number must be less than or equal to 30
...,

Metadata

Metadata

Assignees

Labels

bugSomething that isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions