Skip to content

Commit 115081a

Browse files
committed
mem optimization
1 parent b760f47 commit 115081a

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM adoptopenjdk/openjdk11-openj9:alpine-slim
22
ARG JAR_FILE=target/graphql-java*.jar
3-
ADD ${JAR_FILE} app.jar
4-
ENTRYPOINT ["java","-jar","/app.jar"]
3+
ADD ${JAR_FILE} graphql-java.jar
4+
ENTRYPOINT java -Xshareclasses -Xquickstart -XX:+UseSerialGC -XX:MaxRAM=150m -jar /graphql-java.jar

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: "3.3"
2+
3+
services:
4+
graphql-java:
5+
build:
6+
context: .
7+
dockerfile: ./Dockerfile
8+
ports:
9+
- "8083:8083"
10+
deploy:
11+
resources:
12+
limits:
13+
memory: 320M
14+
reservations:
15+
memory: 128M

src/main/resources/application.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ graphql.url=/graphql/providerservice
1717
spring.jpa.show-sql=true
1818
spring.jpa.properties.hibernate.format_sql=true
1919
logging.level.org.hibernate.SQL=DEBUG
20-
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
20+
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
21+
22+
# memory optimization
23+
server.tomcat.max-connections=20
24+
server.tomcat.threads.max=5

0 commit comments

Comments
 (0)