During an APM Install/Upgrade, getting errors unable to complete model synchronization errors due to value too long for type.

Document ID : KB000046773
Last Modified Date : 06/07/2018
Show Technical Document Details
Issue:

 SYMPTOMS:

 After installing or upgrading to APM 10.x, we see the following error in the EM log:

[ERROR] [Thread-ModelSynchronization] [Manager.AppMap] Unable to complete model synchronization with storage!
org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [INSERT INTO appmap_vertices (vertex_id, start_time, end_time, vertex_name, business_service, application_id, search_attrib1, search_attrib2, search_attrib3, search_attrib4, search_attrib5, gathered_attribs, other_attribs)VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; ERROR: value too long for type character varying(256); nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(256)
...
Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(256)

or

Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(1024)
 

Environment:
 APM 10.0 - 10.3
Cause:
 This message indicates that the character limit (256) has been reached for certain parameters while inserting into the table appmap_vertices in the Postgres db.
Resolution:

To workaround this issue, run the following SQL queries against the APM DB to increase the character limit to 2048:

 ALTER TABLE appmap_vertices ALTER COLUMN vertex_name TYPE varchar(2048);
 ALTER TABLE appmap_model_vertices ALTER COLUMN external_id TYPE varchar(2048);

This may needed to be done to other fields as well.


 
Additional Information:
 This issue will be fixed in APM 10.5 release