Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory Unit issue in .env file #325

Open
SORMAS-ZohaibHassan opened this issue Jan 11, 2022 · 4 comments
Open

Memory Unit issue in .env file #325

SORMAS-ZohaibHassan opened this issue Jan 11, 2022 · 4 comments

Comments

@SORMAS-ZohaibHassan
Copy link

Problem Description:
After Cloning the SORMAS-Docker repository into your local machine, when you try “docker-compose up”. You receive some errors like mentioned below:

error while interpolating services.base-apache2.mem_limit: failed to cast to expected type: strconv.ParseInt: parsing "1000M": invalid syntax

Current Setup:
OS: Windows 10
Docker Client: Docker Desktop 4.3.2 (72729)
Windows Subsystem for Linux Version: WSL2

Quick Fix:
Change All the memory Units in the .env file without “M”. Replace “M” with “000”.
For Example:
APPSERVER_MEM=4300M should be replaced like APPSERVER_MEM=4300000

@JonasCir
Copy link
Contributor

+1
I encounter the same issue in Linux with Docker version 20.10.12 which now includes docker compose directly.
(This was not working for me for quite some time tbh, I always remove these fields when I work with this repo)

@SORMAS-ZohaibHassan
Copy link
Author

SORMAS-ZohaibHassan commented Jan 12, 2022

Hi @JonasCir:
Even after fixing this memory unit issue, I am running into another error.

Error response from daemon: Minimum memory limit allowed is 6MB

Any idea about this error?

FYI: @fhauptmann

@JonasCir
Copy link
Contributor

@zohaibhassan122 I did not encounter this one yet :D For my part, I always completely comment every resource constraint in the base file as none of them work (i.e. are parsed) for me.

Looking at the error I would guess that the value you have there is below minimum, so I would try to double it as long as it works? :D

@JonasCir
Copy link
Contributor

Reading a bit more it seems that resource limits are not support for docker compose v3, they are only effective if you deploy it in swarm mode(see here)

Poor design choice in my opinion, but I guess there is no way around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants