cancel
Showing results for 
Search instead for 
Did you mean: 

PersistenceException - Packet for query is too large

fwachs
Champ in-the-making
Champ in-the-making
Hi all,

Last night a process ran and I found this exception on the log files:
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (2017529 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
### The error may involve org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.insertByteArray-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_)     values (       ?,       1,        ?,        ?,        ?     )
### Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (2017529 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:147)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:134)
        at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:632)
        at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:459)
        at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:167)
        at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:114)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:69)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
        at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceById(RuntimeServiceImpl.java:67)
        at org.activiti.explorer.ui.process.listener.StartProcessInstanceClickListener.buttonClick(StartProcessInstanceClickListener.java:71)
        at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
        … 26 more
Caused by: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (2017529 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.

My question here is, what should I do now? How does this affect my activiti installation? What's the worst that can happen?

I have changed the value of that variable to avoid future problems, but I wanted to know what I should be expecting from the engine after an insert into this table has failed.

Many thanks!

PD: I'm using activiti 5.11.
2 REPLIES 2

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
I would assume the whole transaction failed and the engine or rather the process instances is in the 'previous´ state, meaning the state it was in when this transaction was started.

pbreak75
Champ in-the-making
Champ in-the-making
Hello,

I've got the same problem, did you found a solution without increasing the value of max_allowed_packet ?

Regards,