legacy-knowledge-base
公開されました Jul. 2, 2025

1GB を超えるファイルをダウンロードできません: 「アップストリームの読み取り中に、アップストリームの接続が途中で閉じられました」

written-by

Jose Jimenez

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

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

legacy-article

learn-legacy-article-disclaimer-text

問題

  • Liferay DXP から大きなファイルをダウンロードすることはできません。通常、一部の LAR ファイルと同様に、1 GB を超えるファイルで問題が発生する可能性があります。
  • Web サーバー サービスのログ ファイルに次のようなエラーがあります。
    [error] 75#75: *344298 upstream prematurely closed connection while reading upstream, client: 95.169.229.129, server: , request: "GET /documents/portlet_file_entry/20124/P%C3%A0gines_p%C3%BAbliques_2-20210210061050249.lar/b900a824-f425-16b2-92da-3c1dfa65038e?download=true HTTP/1.1", upstream: "http://127.0.0.1:81/documents/portlet_file_entry/20124/


解決策

  • デフォルトでは、WebServer サービスは、最大サイズが 1024 M の一時ファイルを使用して、プロキシ サーバーからの応答のバッファリングを有効にしています。
  • LCP_WEBSERVER_PROXY_MAX_TEMP_FILE_SIZE 環境変数をサービスに追加することにより、 liferaycloud/nginx:1.16.1-4.0.3 以降、その制限を増やすか、バッファリングを無効にすることができます。
  • 値はメガバイト単位で、デフォルト値は 1024 で、バッファリングを無効にするために 0 を使用できます。
  • 例えば。 webserver/LCP.json のイメージ バージョンを確認し、環境変数を設定します。
    ...
    "env": {
    "LCP_WEBSERVER_PROXY_MAX_TEMP_FILE_SIZE": "0"
    }
    ...

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base