Select to view content in your preferred language

Metrics stop loading to Postgres

213
2
03-03-2025 01:09 PM
TimLehn
Occasional Contributor

I am getting the following error: ERROR: nextval: reached maximum value of sequence "metrics_id_seq" (2147483647).

The maximum ID for metrics is slightly lower than this value, but the sequencer seems to grab a block that puts it over the maximum state. In my metrics table, I see large gaps in the metrics ID each time I add a new server (host), service, portal, etc. I cleaned up some old components I did not need, but the sequencer does not seem to reuse old, unused IDs.

It seems that I either need to renumber all my metrics IDs and the corresponding child tables or set this ID to a much higher number. Has anyone else encountered this issue and found a solution? So far, I have received no help from the ticket I opened, and I do not want to touch the database without ESRI approval.

0 Kudos
2 Replies
DerekLaw
Esri Esteemed Contributor

HI @TimLehn,

What version/release of ArcGIS Monitor are you using? 

ERROR: nextval: reached maximum value of sequence "metrics_id_seq" (2147483647).

Where are you seeing this error message?

In my metrics table, I see large gaps in the metrics ID each time I add a new server (host), service, portal, etc. 

Can you please elaborate - what do you mean by "metrics table"? Can you please provide a screenshot? I'm not clear on your issue.




0 Kudos
Craig_Lunde
Occasional Contributor

I recently had this issue where monitor stopped collecting all data for me. I changed the cycle value from no to yes.

Postgres offers various methods to deal with the stated issue, such as resetting the sequence, altering the maximum value of the sequence, repeating the sequence, and so on. Method 1: Use Cycle Option - Specifying the cycle option will restart the sequence once it reaches the maximum limit.

https://www.commandprompt.com/education/how-to-fix-nextval-reached-maximum-value-of-sequence-error-i...