Additional Configuration

Tomcat Memory Configuration

Note

This is an additional step, which has to be done depending on your server hardware capability.

As the number of users and their connections in your environment increase, the amount of Java Virtual Machine (JVM) heap memory consumed on your servers will also increase. This guide explains how to increase the amount of memory allocated to your environment's JVM heap space.

Note

  • If your server hardware does not have sufficient RAM installed, increasing the Java heap space may be ineffective or it may even reduce overall performance.

  • Java "out of memory" (OOM) errors can occur when the JVM attempts to use more memory than allocated by the Java environment's -Xmx parameter.

  • This procedure requires you to access and restart the docker.

Reference Values for Tomcat Heap Memory Configuration depending on your server memory

Note

The below reference values apply to application server.

Heap Memory Configuration

Small Teams

Medium Teams

Large Teams

< 50 Users

< 500 Users

500+ Users

Min

Recommended

Min

Recommended

Min

Recommended

High End

Memory

8 GB

16 GB

16 GB

24 GB

24 GB

32 - 64 GB

64 GB

Tomcat Heap Memory

-Xms2g -Xmx4g

-Xms4g -Xmx8g

-Xms4g -Xmx8g

-Xms8g -Xmx12g

-Xms8g -Xmx12g

-Xms8g -Xmx16g

-Xms8g -Xmx30g

Execute the following commands on your server to increase memory size.

docker ps
docker exec -it <docker_name>bin/bash
example docker exec -it qmetry_app_1 /bin/bash
//Change directory path:
/home/qmetry/QMetry/bin
cd bin
vim setenv.sh
  • Edit the default configuration for JAVA_OPTS parameter.

  • The default configuration for heap memory are as follows. You can edit the file and update the highlighted values below by referring to the values specified in the above table and your server memory.

    • -Xms3g (Represents minimum 3 GB will be allocated to the QMetry Application)

    • -Xmx4g (Represents maximum 4 GB will be allocated to the QMetry Application)

    • Go to the second line and type letter i to go into insert mode, and update the values.

      Tomcat_Config.png
    • Save the file using Esc and save and exit the file editior.

      :wq 
      exit
      docker stop<docker_name>
      docker start<docker_name>

MySQL Configuration

MySQL configuration below is the default and for verification only. It is auto-configured at the time of installation.

Check Existing Value

Verify MySQL Parameter : `group_concat_max_len`, value should be 50000000.

  1. Login to MySQL Docker:

    docker exec -it qmetry_rds_1 bash
  2. Login to MySQL :

    mysql -u[username] -p[password] -A
  3. Check the parameter value using query :

    SELECT @@group_concat_max_len;
  4. If this value is lower than 50000000, follow the remaining steps to update this value

  5. Exit mysql and exit again, to exit the docker.

    exit

Update if the value is set less than 50000000.

  1. Run the following command

    df -h
    
  2. Go to the /var/lib two directories that end with path /merged.

    Example 4. 

    cd /var/lib/docker/overlay2/<...some random text....>/merged/home



    One of these paths will contain `my.cnf`

    Type the following command to check

    ls
  3. Edit the my.cnf file using command

    vim my.cnf type i to go into insert mode.
  4. Check for parameter : group_concat_max_len, if it does not exist, add it, or else update its value to 50000000

    group_concat_max_len=50000000
  5. Run the following commands to save and exit.

    Esc 
    :wq 
  6. Type Esc and then :wq to save and exit.

    docker stop qmetry_app_1 qmetry_rds_1
    docker start qmetry_rds_1
    docker start qmetry_app_1
  7. Verify the parameter value using steps above.

Publication date: