diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 510ba27..7f77940 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -54,5 +54,5 @@ jobs: else echo "No process found on port 8080" fi - nohup java -XX:NativeMemoryTracking=summary -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/ubuntu/heapdump.hprof -jar storage-0.0.1-SNAPSHOT.jar --spring.profiles.active=local > app.log 2>&1 & + nohup java -Xmx1200m -XX:NativeMemoryTracking=summary -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/ubuntu/heapdump.hprof -jar storage-0.0.1-SNAPSHOT.jar --spring.profiles.active=local > app.log 2>&1 & EOF diff --git a/src/main/java/com/woowacamp/storage/domain/file/controller/MultipartFileController.java b/src/main/java/com/woowacamp/storage/domain/file/controller/MultipartFileController.java index a16aa78..a34384d 100644 --- a/src/main/java/com/woowacamp/storage/domain/file/controller/MultipartFileController.java +++ b/src/main/java/com/woowacamp/storage/domain/file/controller/MultipartFileController.java @@ -129,6 +129,8 @@ private void processMultipartData(InputStream inputStream, UploadContext context fileMetadataRepository.updateUploadStatusById(context.getFileMetadata().metadataId()); } catch (AmazonS3Exception e) { log.error("[AmazonS3Exception] 입력 예외로 완성되지 않은 S3 파일 제거 중 예외 발생. ERROR MESSAGE = {}", e.getMessage()); + } catch (Exception e) { + log.error("[Exception] 예상치 못한 예외가 발생했습니다: {}, {}", e.getCause(), e.getMessage()); } } diff --git a/src/main/java/com/woowacamp/storage/global/constant/CommonConstant.java b/src/main/java/com/woowacamp/storage/global/constant/CommonConstant.java index e1a2af7..c10e876 100644 --- a/src/main/java/com/woowacamp/storage/global/constant/CommonConstant.java +++ b/src/main/java/com/woowacamp/storage/global/constant/CommonConstant.java @@ -5,8 +5,8 @@ public class CommonConstant { public static final Character[] FILE_NAME_BLACK_LIST = {'\\', '/', ':', '*', '?', '"', '<', '>', '|'}; public static final int MAX_FOLDER_DEPTH = 50; - public static final int FILE_WRITER_CORE_POOL_SIZE = 20; - public static final int FILE_WRITER_MAXIMUM_POOL_SIZE = 40; + public static final int FILE_WRITER_CORE_POOL_SIZE = 15; + public static final int FILE_WRITER_MAXIMUM_POOL_SIZE = 30; public static final int FILE_WRITER_KEEP_ALIVE_TIME = 10; public static final int FILE_WRITER_QUEUE_SIZE = 40; public static final int THUMBNAIL_WRITER_CORE_POOL_SIZE = 10; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 9058cf9..3309e66 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -8,8 +8,8 @@ spring: on-profile: local datasource: driver-class-name: com.mysql.cj.jdbc.Driver -# hikari: -# maximum-pool-size: 20 + hikari: + maximum-pool-size: 5 jpa: hibernate: ddl-auto: none @@ -39,13 +39,13 @@ management: export: enabled: true -server: - tomcat: - threads: - min-spare: 10 - max: 20 - accept-count: 100 - max-connections: 20 +#server: +# tomcat: +# threads: +# min-spare: 50 +# max: 20 +# accept-count: 100 +# max-connections: 100 share: server-domain: localhost:8080