NCBACK-25 change limits
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2026-01-25 21:10:17 +07:00
parent 6dacbde522
commit 4cf36d7b17
2 changed files with 24 additions and 2 deletions
+3 -2
View File
@@ -52,11 +52,12 @@ services:
resources: resources:
limits: limits:
cpus: '1.5' cpus: '1.5'
memory: 1G memory: 3G
reservations: reservations:
cpus: '0.5' cpus: '0.5'
memory: 512M memory: 2G
environment: environment:
JAVA_TOOL_OPTIONS: "-Xmx2g -Xms1g -XX:MaxMetaspaceSize=512m -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -XX:+UseContainerSupport -XX:InitialRAMPercentage=50 -XX:MaxRAMPercentage=75"
FILE_STORAGE_PATH: /data/uploads FILE_STORAGE_PATH: /data/uploads
MAX_FILE_SIZE: 10737418240 MAX_FILE_SIZE: 10737418240
FILE_CHUNK_SIZE: 1000000 FILE_CHUNK_SIZE: 1000000
@@ -3,6 +3,9 @@ package ru.soune.nocopy.controller;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
@RestController @RestController
@RequestMapping("check/api") @RequestMapping("check/api")
public class HealtCheckController { public class HealtCheckController {
@@ -11,4 +14,22 @@ public class HealtCheckController {
public HttpStatus healtCheck() { public HttpStatus healtCheck() {
return HttpStatus.OK; return HttpStatus.OK;
} }
@GetMapping("/api/debug/memory")
public Map<String, String> getMemoryInfo() {
Runtime runtime = Runtime.getRuntime();
long mb = 1024 * 1024;
Map<String, String> info = new HashMap<>();
info.put("maxMemory (MB)", String.valueOf(runtime.maxMemory() / mb));
info.put("totalMemory (MB)", String.valueOf(runtime.totalMemory() / mb));
info.put("freeMemory (MB)", String.valueOf(runtime.freeMemory() / mb));
info.put("usedMemory (MB)", String.valueOf((runtime.totalMemory() - runtime.freeMemory()) / mb));
info.put("availableProcessors", String.valueOf(runtime.availableProcessors()));
info.put("JAVA_TOOL_OPTIONS", System.getenv("JAVA_TOOL_OPTIONS"));
info.put("JAVA_OPTS", System.getenv("JAVA_OPTS"));
return info;
}
} }