Attachment upload failed with 'Communications link failure during commit()' error

問題

  1. Using MySQL
  2. Attachments are stored in the database

The following appears in the atlassian-confluence.log:

2011-07-21 10:59:34,649 ERROR [TP-Processor36] [webwork.dispatcher.multipart.MultiPartRequest] <init> org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
 -- url: /confluence/pages/doattachfile.action | userName: admin | referer: http://confluence url/pages/doattachfile.action?pageId=888888
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
	at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)

Which was followed by:

2011-07-21 10:59:34,663 WARN [TP-Processor36] [v2.c3p0.impl.C3P0PooledConnectionPool] doMarkPoolStatus A ConnectionTest has failed, reporting that all previously acquired Connections are likely invalid. The pool will be reset.
 -- url: /confluence/pages/doattachfile.action | page: 888888 | userName: admin | referer: http://confluence url/pages/doattachfile.action?pageId=888888 | action: doattachfile
2011-07-21 10:59:34,665 ERROR [TP-Processor36] [sf.hibernate.transaction.JDBCTransaction] commit Commit failed
 -- url: /confluence/pages/doattachfile.action | page: 888888 | userName: admin | referer: http://confluence url/pages/doattachfile.action?pageId=888888 | action: doattachfile
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during commit(). Transaction resolution unknown.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

原因

MySQL discovered that the SQL Query was taking too long to execute as Confluence was trying to save the attachment into the database and terminated the query. This is usually because the interactive_timeout was set too low.

解決方法

  1. Execute the following to find out how long the MySQL system timeout variables are set

    show variables like "%timeout%";
    

    (info) The default value for interactive_timeout is 28800 seconds.

  2. If lower than default, set it back to 28800 seconds with this (also change the value in your my.ini or my.cnf file):

    set global interactive_timeout=28800;
    
最終更新日 2016 年 3 月 30 日

この翻訳に満足しましたか?

はい
いいえ
この記事についてのフィードバックを送信する

お探しの情報が見つかりませんか?

コミュニティへの質問

Powered by Confluence and Scroll Viewport.