{"record":{"id":"34ce68631e8c6ca9","repo":"junegunn/fzf","slug":"every-interval-is-too-large","errorCode":null,"errorMessage":"every() interval is too large","messagePattern":"every\\(\\) interval is too large","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/options.go","lineNumber":1331,"sourceCode":"\t\t\t} else {\n\t\t\t\treturn nil, list, errors.New(\"unsupported key: \" + key)\n\t\t\t}\n\t\t}\n\t}\n\treturn chords, list, nil\n}\n\nfunc parseEveryEvent(arg string) (tui.Event, error) {\n\tsecs, err := strconv.ParseFloat(strings.TrimSpace(arg), 64)\n\tif err != nil || math.IsNaN(secs) || math.IsInf(secs, 0) || secs <= 0 {\n\t\treturn tui.Event{}, errors.New(\"every() requires a positive number of seconds\")\n\t}\n\tif secs < 0.01 {\n\t\tsecs = 0.01\n\t}\n\tms := math.Round(secs * 1000)\n\tif ms > math.MaxInt32 {\n\t\treturn tui.Event{}, errors.New(\"every() interval is too large\")\n\t}\n\treturn tui.Event{Type: tui.Every, Char: rune(int32(ms))}, nil\n}\n\nfunc parseScheme(str string) (string, []criterion, error) {\n\tstr = strings.ToLower(str)\n\tswitch str {\n\tcase \"history\":\n\t\treturn str, []criterion{byScore}, nil\n\tcase \"path\":\n\t\treturn str, []criterion{byScore, byPathname, byLength}, nil\n\tcase \"default\":\n\t\treturn str, []criterion{byScore, byLength}, nil\n\t}\n\treturn str, nil, errors.New(\"invalid scoring scheme: \" + str + \" (expected: default|path|history)\")\n}\n\nfunc parseTiebreak(str string) ([]criterion, error) {","sourceCodeStart":1313,"sourceCodeEnd":1349,"githubUrl":"https://github.com/junegunn/fzf/blob/bd4efa277b49ef34ca4025bff9b1a288e1980eff/src/options.go#L1313-L1349","documentation":"parseEveryEvent converts the interval to milliseconds and stores it in an int32 field of the Event struct. If seconds*1000 exceeds math.MaxInt32 (≈2147483 seconds ≈ 24.8 days), the value cannot be represented and this error is returned.","triggerScenarios":"every(99999999) or any interval over ~24.8 days; also large-but-finite values like 1e9 seconds; Infinity is already caught by the earlier NaN/Inf guard, so only finite huge numbers reach this check.","commonSituations":"Typing an extra digit (every-864000s); unit confusion (passing milliseconds where seconds are expected, e.g. every(86400000)); scripts computing intervals from ms timestamps.","solutions":["Keep the interval under 2147483.647 seconds (~24.8 days) — in practice use minutes/hours at most","Fix unit confusion: the argument is seconds, not milliseconds","Check for extra digits / pasted large constants in generated --bind strings"],"exampleFix":"# before\nfzf --bind 'every-86400000:reload(...)'\n# after\nfzf --bind 'every-86400:reload(...)'","handlingStrategy":"validation","validationCode":"INTERVAL=\"${INTERVAL:-5}\"\nawk -v i=\"$INTERVAL\" 'BEGIN { if (i+0 > 2147483.647) exit 1 }' && fzf --bind \"every-${INTERVAL}s:reload(...)\" || { echo 'interval too large (max ~24.8 days)' >&2; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["The argument is seconds — never milliseconds","Cap generated intervals at 2147483 seconds","Prefer small human units (5, 60, 3600) which are far from the limit"],"tags":["fzf","keybindings","overflow","validation","go"],"backgroundTag":null,"analyzedSha":"bd4efa277b49ef34ca4025bff9b1a288e1980eff","analyzedAt":"2026-08-15T06:11:46.983Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}