Store and Forward ERROR: value too long for type character varying(255)

Every once in a while I get this “ERROR: value too long for type character varying(255)” in the gateway log.
The interesting thing is that I’ve changed all the fields in the ‘alarm_events’ and ‘alarm_events_data’ from varchar(255) to varchar unlimited and error is still coming.
I have around 1500 alarm tags and none have alarm text/name/label longer than 200 characters.

Edit: Ignition v7.9.10, PostgreSQL 9.6

How to find which alarm is causing that?

Turns out that you can find on which table in the DB is this happening.
You must look in the Postgresql server logs (pg_log)

Turns out that I didn’t (I thought I was) change ‘propname’ filed type to unlimited in the alarm_event_data.

But still… it would be very helpful if there were more info from the Ignition on who/what/where is causing that error…

Agreed - unfortunately, due to the asynchronous nature of store and forward, it’s really hard to actually do that. From the alarming side, once the insert query has hit store and forward it’s considered done - as long as S+F has accepted the data, it’s considered to have done it’s job. From the store and forward side, there’s no real way for us to understand the query at that point (since it could have come from anywhere, and it could be going into any kind of DB, including one we might not even know about), so we just have to give it to the database and hope we get a useful error back.

The best solution, which is on our to-do list, is to better support exporting of different types of quarantine data so you could at least see what we’re trying to insert and make necessary adjustments in your table.

1 Like