Índice

Objetivo

Este guia mostra como aumentar o limite máximo de upload do ambiente instalado Fluig.

Como aumentar o limite de upload do ambiente Fluig

Para aumentar o limite de upload, siga os passos abaixo:

A realização deste procedimento pode causar problemas de performance na plataforma. Recomendamos que seja realizado em ambiente de homologação antes de configurar em produção.

  1. Pare os serviços do fluig.
  2. Localize o arquivo domain.xml, que está disponível em [Instalação_fluig]/appserver/domain/configuration, e abra em um editor de texto utilizando um usuário com permissões de administrador.
  3. Procure pela tag http-listener e o seu atributo max-post-size. Altere o valor para "2147483648" para permitir até 2GB de upload.

                <subsystem xmlns="urn:jboss:domain:undertow:3.1">
                    <buffer-cache name="default"/>
                    <server name="default-server">
                        <http-listener name="default" socket-binding="http" max-post-size="1073741824"/>
    
  4. Se você possuir HTTPS no fluig, precisará editar o valor também do parâmetro https-listener max-post-size. Se você não tiver HTTPS no fluig, só existirá o primeiro parâmetro.

    <http-listener max-post-size="2147483648" name="default" proxy-address-forwarding="true" socket-binding="http"/>
    <https-listener max-post-size="2147483648" name="https" secure="true" security-realm="TOTVSTech" socket-binding="https"/>
  5. Salve e inicie os serviços do fluig na ordem correta.
  6. Tente publicar o arquivo em seguida.


Ao alterar o limite padrão de upload na configuração do serviço fluig acima do valor padrão, a performance para todos os usuários fluig poderá ser afetada durante o upload de arquivos com tamanho superior ao limite padrão.


Escolhendo o valor correto



Uma boa prática para determinar o novo valor da propriedade max-post-size em bytes, é utilizar um a potência de base 2 (Ex.: 210, 220, 230, ... ), conforme norma IEC 80000-13 : 2008. Isto se deve ao fato de que todos os dispositivos de armazenamento são projetados para guardar um volume de dados, sendo este um número múltiplo de dois, justamente por causa da natureza binária do bit, embora comercialmente seja utilizado o sistema internacional (Ex.: 101, 102, 103, ...).

Segue abaixo alguns exemplos de valores baseados nesta lógica:


Tabela 1 - Valores de armazenamento conforme norma IEC 80000-13 : 2008

Potência de base 2gibibyte (GiB)mebibyte (MiB)quibibyte (KiB)Bytesbits

​20

0

​0

0

​0

​1

21

0

0

0

0

2

23

0

0

0

1

8

210

0

0

1

1024

8192

220

0

0

1024

1048576

8388608

230

1

1024

1048576

1073741824

8589934592

231

2

2048

2097152

2147483648

17179869184



<table class="infobox" style="padding: 0; text-align: left; width: 0">
    <tbody>
        <tr>
            <th colspan="7" style="background:#ccf; text-align: center">
                <div style="float:right;margin-right:8px;">
                    <div class="plainlinks hlist navbar mini"></div>
                </div>Tabela 2 - Múltiplos do <a href="https://pt.wikipedia.org/wiki/Byte" title="Byte">byte</a>
            </th>
        </tr>
        <tr>
            <th colspan="3" style="background-color:#ddf; text-align: center;"><a href="https://pt.wikipedia.org/wiki/Prefixo_bin%C3%A1rio"
                    title="Prefixo binário">Prefixo binário</a> (<a
                    href="https://pt.wikipedia.org/wiki/Comiss%C3%A3o_Eletrot%C3%A9cnica_Internacional"
                    title="Comissão Eletrotécnica Internacional">IEC</a>)
            </th>
            <th>
            </th>
            <th colspan="3" style="background-color:#ddf; text-align: center;"><a
                    href="https://pt.wikipedia.org/wiki/Sistema_Internacional_de_Unidades" title="Sistema Internacional de Unidades">Prefixo do
                    SI</a>
            </th>
        </tr>
        <tr>
            <th>Nome
            </th>
            <th>Símbolo
            </th>
            <th>Múltiplo
            </th>
            <th>
            </th>
            <th>Nome
            </th>
            <th>Símbolo
            </th>
            <th>Múltiplo
            </th>
        </tr>
        <tr>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Byte" title="Byte">byte</a>
            </td>
            <td>B
            </td>
            <td>2<sup>0</sup>
            </td>
            <td>
            </td>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Byte" title="Byte">byte</a>
            </td>
            <td>B
            </td>
            <td>10<sup>0</sup>
            </td>
        </tr>
        <tr>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Kibibyte" class="mw-redirect" title="Kibibyte">kibibyte</a>
            </td>
            <td>KiB
            </td>
            <td>2<sup>10</sup>
            </td>
            <td>
            </td>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Kilobyte" title="Kilobyte">kilobyte</a>
            </td>
            <td>kB
            </td>
            <td>10<sup>3</sup>
            </td>
        </tr>
        <tr>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/MebiByte" title="MebiByte">mebibyte</a>
            </td>
            <td>MiB
            </td>
            <td>2<sup>20</sup>
            </td>
            <td>
            </td>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Megabyte" title="Megabyte">megabyte</a>
            </td>
            <td>MB
            </td>
            <td>10<sup>6</sup>
            </td>
        </tr>
        <tr>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Gibibyte" title="Gibibyte">gibibyte</a>
            </td>
            <td>GiB
            </td>
            <td>2<sup>30</sup>
            </td>
            <td>
            </td>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Gigabyte" title="Gigabyte">gigabyte</a>
            </td>
            <td>GB
            </td>
            <td>10<sup>9</sup>
            </td>
        </tr>
        <tr>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Tebibyte" title="Tebibyte">tebibyte</a>
            </td>
            <td>TiB
            </td>
            <td>2<sup>40</sup>
            </td>
            <td>
            </td>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Terabyte" title="Terabyte">terabyte</a>
            </td>
            <td>TB
            </td>
            <td>10<sup>12</sup>
            </td>
        </tr>
        <tr>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Pebibyte" title="Pebibyte">pebibyte</a>
            </td>
            <td>PiB
            </td>
            <td>2<sup>50</sup>
            </td>
            <td>
            </td>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Petabyte" title="Petabyte">petabyte</a>
            </td>
            <td>PB
            </td>
            <td>10<sup>15</sup>
            </td>
        </tr>
        <tr>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Exbibyte" title="Exbibyte">exbibyte</a>
            </td>
            <td>EiB
            </td>
            <td>2<sup>60</sup>
            </td>
            <td>
            </td>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Exabyte" title="Exabyte">exabyte</a>
            </td>
            <td>EB
            </td>
            <td>10<sup>18</sup>
            </td>
        </tr>
        <tr>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Zebibyte" title="Zebibyte">zebibyte</a>
            </td>
            <td>ZiB
            </td>
            <td>2<sup>70</sup>
            </td>
            <td>
            </td>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Zettabyte" title="Zettabyte">zettabyte</a>
            </td>
            <td>ZB
            </td>
            <td>10<sup>21</sup>
            </td>
        </tr>
        <tr>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Yobibyte" title="Yobibyte">yobibyte</a>
            </td>
            <td>YiB
            </td>
            <td>2<sup>80</sup>
            </td>
            <td>
            </td>
            <td style="text-align:left;"><a href="https://pt.wikipedia.org/wiki/Yottabyte" title="Yottabyte">yottabyte</a>
            </td>
            <td>YB
            </td>
            <td>10<sup>24</sup>
            </td>
            <td>
            </td>
        </tr>
    </tbody>
</table>




Esta documentação é válida a partir da atualização 1.6.5 - Liquid. Se você utiliza uma atualização anterior, ela pode conter informações diferentes das quais você vê na sua plataforma.

Artigos relacionados

Parâmetros