Error saving alert annotation batch

Grafana version : Grafana v13.0.1 (a100054f)

Noticed this error of late.

<30>1 2026-05-04T10:59:40.20063-04:00 raspberry05 grafana 247674 - - logger=ngalert.state.historian backend=annotations rule_uid=cf50q8nv3ooaoe org_id=1 t=2026-05-04T10:59:40.200174121-04:00 level=error msg=“Failed to save history batch” samples=6 err=“error saving alert annotation batch: SQL logic error: too many SQL variables (1)”

Is there something I can do to eliminate this from happening?

Just going back three hours I see it has happen 10 times.

hellow @scootertramp what is your evaluation interval , increased it.
Reduce labels in alerts
or
Move Grafana DB to: Postgresql if needed

Evaluation was 30 seconds with a pending period of 30 seconds.

I changed it to 10 seconds with a pending period of 20 seconds.

What would moving to Postgres solve? The current Grafana db is rather small at 260M.

The update frequency isn’t all that high since this is a Home Lab monitoring set-up.

Here are six messages that meet the alert settings. These are pretty consistent as they happen every hour. Also attached is my alert definition

Rsyslog.json (1.2 KB)

.

warn <4>1 2026-05-05T08:58:51.961732-04:00 xt8-down kernel - - [meta sequenceId=“3240”] replay_ctr:

warn <4>1 2026-05-05T08:58:51.961732-04:00 xt8-down kernel - - [meta sequenceId=“3241”] 0000: 00 00 00 00 00 00 00 4b

warn <4>1 2026-05-05T08:58:51.955346-04:00 xt8-down kernel - - [meta sequenceId=“3238”] kek:

warn <4>1 2026-05-05T08:58:51.955346-04:00 xt8-down kernel - - [meta sequenceId=“3239”] 0000: 3e b4 44 6b 2f 04 0a 09 c9 8a f5 b7 50 aa 34 e8

warn <4>1 2026-05-05T08:58:51.954313-04:00 xt8-down kernel - - [meta sequenceId=“3236”] kck:

warn <4>1 2026-05-05T08:58:51.954313-04:00 xt8-down kernel - - [meta sequenceId=“3237”] 0000: a0 a5 1b 2d 55 5c 00 15 ee dd 8e 6a de 94 ef c7

Changing interval had no effect. I tried ungrouping alert emails since the samples size seemed to match the number of warning alerts. Did not resolve error.

Just more background information. It appears this started on May 2nd.

Grafana was last upgraded on Apr 18th.

dpkg.log.1:2026-04-18 06:48:19 status unpacked grafana:arm64 13.0.1
dpkg.log.1:2026-04-18 06:48:19 status half-configured grafana:arm64 13.0.1
dpkg.log.1:2026-04-18 06:48:20 status installed grafana:arm64 13.0.1