=====================================
Increasing artifact upload size limit
=====================================

If you have upgraded to Package Security Manager ``6.6.2`` or later and require support for artifacts that exceed 3GB in size, you must update Package Security Manager to accept them. 

How do I know if I need to increase my upload size limit?
=========================================================

There is a test you can perform to determine whether or not you need to increase your artifact upload size limit:

#. Open a terminal and connect to your instance of Package Security Manager.
#. Enter the docker container and count the number of rows in the ``routes`` and ``blobs`` tables by running the following command: 

    .. code-block:: none

        sudo docker exec -it postgres psql -U postgres
        select count(*) from routes;select count(*) from blobs;
        \q

    If the count for either value exceeds 2,000,000, you must increase your artifact upload size limit manually.

Increasing the size limit
=========================

To increase the package upload size limit: 

#. Enter your Package Security Manager installer directory by running the following command: 

    .. code-block:: none

        # Replace <INSTALLER> with your Package Security Manager installer directory
        cd <INSTALLER>

#. Run the following command: 

    .. code-block:: none

        sudo docker compose exec repo_api /bin/repo update-blob-sizes-to-big-int

