Error with updating services with large JSON payload
Detected at a CR-related service that runs for 2 weeks. Every 3 minutes a note is added to the RFS "Supporting Resource Attribute Changed with id: xxx"
.
At the referenced resource this note is added every 3 minutes "Resource characteristics changed : metadata, yaml, json , _CR_SPEC_APPLIED , AdditionPropertiesAsJson,status.conditions,"
, that triggers the note in RFS.
An example service order that this is happening is this.
When the order ending date expired and OSOM turned the CFS into terminated state, the same state change was propagated into the RFS as well.
OSOM logs:
15:25:06.059 [task-4] INFO o.e.o.o.m.ServiceOrderManager - will update Service : 010de113-6b9e-4485-b2b5-c1f947092ade
18:45:07.820 [task-29] INFO o.e.o.o.s.FetchServiceQueueItems - Will TERMINATE service with id: 010de113-6b9e-4485-b2b5-c1f947092ade
18:45:07.821 [task-29] INFO o.e.o.o.m.ServiceOrderManager - will update Service : 010de113-6b9e-4485-b2b5-c1f947092ade
18:45:28.079 [Camel (camel-1) thread #599 - JmsReplyManagerOnTimeout[CATALOG.UPD.SERVICE]] WARN o.a.c.c.j.r.TemporaryQueueReplyManager - Timeout occurred after 20000 millis waiting for reply message with correlationID [Camel-0B55C3DC39DE398-0000000000001A7C] on destination temp-queue://ID:633630833fc0-44553-1727860381253-1:10:1. Setting ExchangeTimedOutException on (MessageId: 0B55C3DC39DE398-0000000000001A7E on ExchangeId: 0B55C3DC39DE398-0000000000001A7E) and continue routing.
18:45:28.080 [task-29] ERROR o.e.o.o.m.ServiceOrderManager - Cannot update Service: 010de113-6b9e-4485-b2b5-c1f947092ade: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[0B55C3DC39DE398-0000000000001A7E]
Then TMF API has this error while attempting to write the updated RFS into the DB:
TMF logs:
18:46:24.561 [Camel (camel-1) thread #25 - JmsConsumer[EVENT.RESOURCE.ATTRCHANGED]] DEBUG o.e.o.t.s.service.ServiceRepoService - Will add ServiceActionQueueItem ServiceRefId: 010de113-6b9e-4485-b2b5-c1f947092ade
18:46:24.590 [Camel (camel-1) thread #25 - JmsConsumer[EVENT.RESOURCE.ATTRCHANGED]] DEBUG o.e.o.t.s.service.ServiceRepoService - Will add ServiceActionQueueItem ServiceRefId result: 0
18:46:24.648 [Camel (camel-1) thread #25 - JmsConsumer[EVENT.RESOURCE.ATTRCHANGED]] DEBUG o.e.o.t.s.service.ServiceRepoService - Will add ServiceActionQueueItem ServiceRefId: 6dae6d01-d518-47c2-a867-f5860aef98a1
18:46:24.802 [Camel (camel-1) thread #25 - JmsConsumer[EVENT.RESOURCE.ATTRCHANGED]] WARN o.h.e.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: S1000
18:46:24.802 [Camel (camel-1) thread #25 - JmsConsumer[EVENT.RESOURCE.ATTRCHANGED]] ERROR o.h.e.jdbc.spi.SqlExceptionHelper - Packet for query is too large (6,334,387 > 4,194,304). You can change this value on the server by setting the 'max_allowed_packet' variable.
org.springframework.orm.jpa.JpaSystemException: could not execute statement [Packet for query is too large (6,334,387 > 4,194,304). You can change this value on the server by setting the 'max_allowed_packet' variable.] [insert into service_action_queue_item (action,inserted_date,loriginal_service,service_ref_id,uuid) values (?,?,?,?,?)]
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:320)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:229)
at org.etsi.osl.tmf.sim638.service.ServiceRepoService.addServiceActionQueueItem(ServiceRepoService.java:950)
at org.etsi.osl.tmf.sim638.service.ServiceRepoService.updateService(ServiceRepoService.java:660)
at org.etsi.osl.tmf.sim638.service.ServiceRepoService.resourceAttrChangedEvent(ServiceRepoService.java:1148)
18:46:24.808 [Camel (camel-1) thread #25 - JmsConsumer[EVENT.RESOURCE.ATTRCHANGED]] ERROR o.a.c.p.e.DeadLetterChannel - Failed delivery for (MessageId: topic_EVENT.RESOURCE.ATTRCHANGED_ID_c31ec414389b-45021-1727894240246-1_3_1_1_43 on ExchangeId: A6D4ED29A8B73D7-0000000000000021). On delivery attempt: 2 caught: org.springframework.transaction.UnexpectedRollbackException: Transaction silently rolled back because it has been marked as rollback-only
18:46:25.809 [Camel (camel-1) thread #25 - JmsConsumer[EVENT.RESOURCE.ATTRCHANGED]] DEBUG o.e.o.t.s.service.ServiceRepoService - ResourceAttributeValueChangeNotification