I am doing quite expensive for the memory parsing of 50000 HTML pages. While parsing, I am writing them to the database which is defined in my docker-compose.yml file. After 25000 pages are parsed parsing stops and I get such an error:
AsyncExecutor.default-11" java.lang.OutOfMemoryError: Java heap space
How can I change Java heap size in my docker-compose file so all the data could fit into the database?
My docker-compose file looks like this:
version: '2'
services:
app:
image: "user/app:latest"
depends_on:
- "db"
api:
image: "user/=api:latest"
ports:
- "7070:7070"
depends_on:
- "db"
db:
image: postgres
environment:
JVM_OPTS: "-Xms8g -Xms8g"
POSTGRES_DB: postgresdb
POSTGRES_USER: user
POSTGRES_PASSWORD: password
I would be grateful for any advice!