Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Database Memory Leak

Daniel Wilson   ( User )

Commented 4 years ago

Hello, After setting up akaunting in a couple of containers everything was running well until a few days passed and the server crashed due to a memory limit.

After rebooting and having a look at the containers I noticed the db containing was using a lot of ram and would increase it's use at a rate of 10mb per minute when the web use interface is being used.

CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
d5b15afb5814 phpmyadmin 0.00% 9.898MiB / 978.6MiB 1.01% 2.22kB / 0B 36.4MB / 0B 6
8279d8375043 akaunting-docker_akaunting_php_1 0.00% 84.41MiB / 978.6MiB 8.63% 5.32MB / 5.87MB 234MB / 6.75MB 4
db48348eb29f akaunting-docker_akaunting_nginx_1 0.00% 2.672MiB / 978.6MiB 0.27% 6.11MB / 35MB 36.5MB / 0B 2
6c114ba3e97e akaunting-docker_akaunting_db_1 0.11% 351MiB / 978.6MiB 35.87% 773kB / 2.41MB 141MB / 15.3MB 39

as you can see above it is using 351mb. Is this normal? Here is my dockcer-compose config

version: '3.7'

services:
akaunting_nginx:
build: ./nginx
ports:
- ${HOST_PORT}:80
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- app-data:/var/www/akaunting
restart: unless-stopped

akaunting_php:
build: ./php
volumes:
- app-data:/var/www/akaunting
restart: unless-stopped

akaunting_db:
image: mysql:latest
ports:
- 3306:3306
restart: unless-stopped
volumes:
- db-data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_USER_PASSWORD}
command: --default-authentication-plugin=mysql_native_password

fix_permissions:
build: ./php
command: chown -R www-data:www-data /var/www/akaunting
volumes:
- app-data:/var/www/akaunting
depends_on:
- akaunting_php

phpmyadmin:
depends_on:
- akaunting_db
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
restart: always
ports:
- '8002:80'
environment:
PMA_HOST: akaunting_db

volumes:
app-data:
db-data:

Please login or register to leave a response.

Showing 1 to 1 of 1 discussions