diff --git a/photo-service/src/main/resources/application.yaml b/photo-service/src/main/resources/application.yaml index ea16896..b510537 100644 --- a/photo-service/src/main/resources/application.yaml +++ b/photo-service/src/main/resources/application.yaml @@ -5,6 +5,14 @@ spring: url: ${MYSQL_URL} username: ${MYSQL_USERNAME} password: ${MYSQL_PASSWORD} + pool: + enabled: true + initial-size: 30 + max-acquire-time: 5s + max-create-connection-time: 5s + max-idle-time: 60m + max-life-time: 60m + max-size: 50 flyway: url: ${FLYWAY_URL} baseline-on-migrate: true @@ -60,4 +68,4 @@ recap: src: /usr/bin/recap/src/ lambda: - endpoint: ${LAMBDA_URL} \ No newline at end of file + endpoint: ${LAMBDA_URL} diff --git a/photo-service/src/main/resources/db/migration/V13__addIndexOnExternalIdInAlbumTable.sql b/photo-service/src/main/resources/db/migration/V13__addIndexOnExternalIdInAlbumTable.sql new file mode 100644 index 0000000..7fd5043 --- /dev/null +++ b/photo-service/src/main/resources/db/migration/V13__addIndexOnExternalIdInAlbumTable.sql @@ -0,0 +1 @@ +CREATE INDEX `idx_album_external_id` ON `album`(`external_id`); diff --git a/user-service/src/main/resources/application.yaml b/user-service/src/main/resources/application.yaml index bfa2a3c..536047d 100644 --- a/user-service/src/main/resources/application.yaml +++ b/user-service/src/main/resources/application.yaml @@ -11,6 +11,14 @@ spring: url: ${MYSQL_URL} username: ${MYSQL_USERNAME} password: ${MYSQL_PASSWORD} + pool: + enabled: true + initial-size: 30 + max-acquire-time: 5s + max-create-connection-time: 5s + max-idle-time: 60m + max-life-time: 60m + max-size: 50 logging: level: org.springframework.data.r2dbc: DEBUG @@ -49,4 +57,4 @@ slack: token: ${SLACK_TOKEN} channel: error: ${SLACK_ERROR_CHANNEL} - member: ${SLACK_MEMBER_CHANNEL} \ No newline at end of file + member: ${SLACK_MEMBER_CHANNEL}