Legacy Knowledge Base
Published Jun. 30, 2025

Cannot upload files larger than 1GB in size to Document Library when clamAV is enabled

Written By

Daniel Carrillo Broeder

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • Big files (>1GB) cannot be uploaded to the Document Library in SaaS/PaaS environments with clamAV enabled.
  • Some errors related to clamAV could be thrown:
  • javax.portlet.PortletException: fi.solita.clamav.ClamAVSizeLimitException: Clamd size limit exceeded. Full reply from server: INSTREAM size limit exceeded. ERROR_ [Sanitized]
    at com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCActionCommand.processAction(BaseMVCActionCommand.java:69)
    at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:378)
    at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:88)
  • java.net.SocketException: Broken pipe (Write failed)\n\tat java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:?]
    java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:110) ~[?:?]\n\tat java.net.SocketOutputStream.write(SocketOutputStream.java:150)
    fi.solita.clamav.ClamAVClient.scan(ClamAVClient.java:98) ~[?:?]
    com.liferay.antivirus.clamd.scanner.internal.ClamdAntivirusScanner.scan(ClamdAntivirusScanner.java:69)

Environment

  • Liferay SaaS / PaaS and clamAV antivirus enabled.

Resolution

  • PaaS
    • You could disable clamAV itnegration temporary.
    • As an alternative, clamAV limits could be raised by modifying clamd.conf but it impact the performance of your server, and should not be higher than 2GB.
      • MaxScanSize 1000M
        MaxFileSize 1000M
        StreamMaxLength 1000M
  • SaaS
    • This limitation is currently a feature of the SaaS model and cannot be disabled by default, so each case will be evaluated and resolved individually.
    • Contact Liferay through a support ticket for assistance.

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base