• Community
  • Products
  • Confluence
  • Questions
  • Confluence. Error while uploading attachment. java.lang.RuntimeException: There was a problem evicting or flushing an AttachmentData object

Confluence. Error while uploading attachment. java.lang.RuntimeException: There was a problem evicting or flushing an AttachmentData object

Alex Kiselev _Itransition_ June 3, 2013

confluence 4.3 + mysql 5.5 + apache 2.2 on windows server 2008 r2

Attachment storage = database

Attachment max size = 20.00 MB

There is a reqular and from time to time reproducible problem (but sometimes it's uploaded correctly) while uploading pdf file about 900kb:


System Error

A system error has occurred — our apologies!

For immediate troubleshooting, consult our knowledge base for a solution.

If you would like to receive support from Atlassian's support team, ask your Confluence administrator to create a support issue on Atlassian's support system with the following information:

a description of your problem and what you were doing at the time it occurred
a copy of the error and system information found below
a copy of the application logs (if possible).

Your Confluence administrator can use the support request form to create a support ticket which will include this information.

We will respond as promptly as possible.
Thank you!

Return to site homepage…
Cause

java.lang.RuntimeException: There was a problem evicting or flushing an AttachmentData object:
at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAttachmentDataDao.save(HibernateAttachmentDataDao.java:68)

caused by: net.sf.hibernate.exception.GenericJDBCException: could not insert: [com.atlassian.confluence.pages.AttachmentData#8323583]
at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90)

caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 47 milliseconds ago. The last packet sent successfully to the server was 47 milliseconds ago.
at sun.reflect.GeneratedConstructorAccessor605.newInstance(Unknown Source)

caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)

1 answer

1 accepted

1 vote
Answer accepted
Septa Cahyadiputra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2013

Hi Alex,

It is quite difficult to pin point the cause of the issue with only partial stack trace to review. However this particular line:

caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 47 milliseconds ago. The last packet sent successfully to the server was 47 milliseconds ago.
at sun.reflect.GeneratedConstructorAccessor605.newInstance(Unknown Source)

Seems to indicate that Confluence was not able to connect to your database in the process of attaching the attachment due to communication failure. We highly recommend you to review our documentation and see if the provided resolution help stabilize your database.

Hope it help.

Cheers,
Septa Cahyadiputra

Alex Kiselev _Itransition_ June 16, 2013

Thanks for your reply.

There are lots of suggestions in common on link provided. Could you help to find out the particular reason of the problem, then I'll be able concentrate on it.

I did follow recommendations step 4:

threads from conf\server.xml

maxProcessors="75" enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000"

db connections from cfg.xml

<property name="hibernate.c3p0.max_size">60</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.min_size">0</property>
<property name="hibernate.c3p0.timeout">30</property>

And the problem soon had been reproduced

Septa Cahyadiputra
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 16, 2013

Again, it would be difficult to pin point without the rest of the data and the mentioned additional information. HOwever for a start you can try to increase the max connection as mentioned on steps 4

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events