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
- Enabling Antivirus Scanning for Uploaded Files
- Unable to upload file bigger than 10MB with ClamAVSizeLimitException after enabling Antivirus
- How to achieve antivirus scanning for file uploads to Documents and Media in an LXC environment?
- Error uploading files larger than 100MB in Liferay Cloud
- Liferay Cloud Infrastructure - Antivirus