Skip to content

Bug: max timer overflow causes db restart #988

@asimonson1125

Description

@asimonson1125

Bug description

Running zipline with postgres via docker compose (not that it should matter):

I increased the "Delete Files Interval" to "30d". Saving this starts a 1ms timer+task cycle that spikes CPU usage and keeps the container active.
Issue is silent, detected via container resource monitoring.

TimeoutOverflowWarning: 2592000000 does not fit into a 32-bit signed integer.

Timeout duration was set to 1.

causing:

DriverAdapterError: terminating connection due to administrator command

...

     at async e.run (/zipline/node_modules/.pnpm/@prisma+client@6.13.0_prisma@6.13.0_typescript@5.9.3__typescript@5.9.3/node_modules/@prisma/client-engine-runtime/src/interpreter/QueryInterpreter.ts:76:23) {
  cause: {
    kind: 'postgres',
    code: '57P01',
    severity: 'FATAL',
    message: 'terminating connection due to administrator command',
    detail: undefined,
    column: undefined,
    hint: undefined
  },
  clientVersion: '6.13.0'
} 

Fix: reject timers longer than 24 days

How is Zipline being run?

On docker (docker, docker compose, etc.)

Zipline Version

4.4.1

If applicable, what browsers are you seeing this issue on?

No response

Relevant Logs

No response

Steps to Reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions