Document and Media (DAM) Loading issue

When I deploy a large file in Liferay’s Documents and Media (DAM) and my site experiences heavy traffic, the site goes down because all users are trying to preview the same large file. However, when we switch to fetching the file directly from the server (bypassing Liferay), the site remains stable and performs fine.

Why does serving the file through Liferay cause the site to crash under load, and what is the recommended approach to handle large file delivery in DAM without impacting site availability?

Liferay slows down or freezes because it tries to process large files inside the portal, not just store them. It generates previews, checks permissions, logs audits, scans files, and loads big chunks into memory. This blocks many request threads, so the portal becomes unresponsive. Here is the quick fix for your issue:

  • Store files in S3 and let users download directly .

  • Turn off preview generation for big files.

  • Use CDN or Nginx to serve large downloads instead of Liferay.

HTH

  • Gnaniyar Zubair