diff --git a/build/docker/api/application.conf b/build/docker/api/application.conf index f3d2e8ef2..6a5dd8732 100644 --- a/build/docker/api/application.conf +++ b/build/docker/api/application.conf @@ -351,6 +351,10 @@ akka.http { # Set to `infinite` to disable. bind-timeout = 5s + # A default request timeout is applied globally to all routes and can be configured using the + # akka.http.server.request-timeout setting (which defaults to 20 seconds). + # request-timeout = 60s + # Show verbose error messages back to the client verbose-error-messages = on } diff --git a/modules/api/src/it/resources/application.conf b/modules/api/src/it/resources/application.conf index dd3b7006e..f96a2c5e5 100644 --- a/modules/api/src/it/resources/application.conf +++ b/modules/api/src/it/resources/application.conf @@ -348,6 +348,10 @@ akka.http { # Set to `infinite` to disable. bind-timeout = 5s + # A default request timeout is applied globally to all routes and can be configured using the + # akka.http.server.request-timeout setting (which defaults to 20 seconds). + # request-timeout = 60s + # Show verbose error messages back to the client verbose-error-messages = on } diff --git a/modules/api/src/main/resources/application.conf b/modules/api/src/main/resources/application.conf index c1ee28ca9..68b519c26 100644 --- a/modules/api/src/main/resources/application.conf +++ b/modules/api/src/main/resources/application.conf @@ -367,6 +367,10 @@ akka.http { # Set to `infinite` to disable. bind-timeout = 5s + # A default request timeout is applied globally to all routes and can be configured using the + # akka.http.server.request-timeout setting (which defaults to 20 seconds). + # request-timeout = 60s + # Show verbose error messages back to the client verbose-error-messages = on } diff --git a/modules/api/src/universal/conf/application.conf b/modules/api/src/universal/conf/application.conf index ff70827df..56008f0a7 100644 --- a/modules/api/src/universal/conf/application.conf +++ b/modules/api/src/universal/conf/application.conf @@ -352,6 +352,10 @@ akka.http { # Set to `infinite` to disable. bind-timeout = 5s + # A default request timeout is applied globally to all routes and can be configured using the + # akka.http.server.request-timeout setting (which defaults to 20 seconds). + # request-timeout = 60s + # Show verbose error messages back to the client verbose-error-messages = on } diff --git a/modules/docs/src/main/mdoc/operator/config-api.md b/modules/docs/src/main/mdoc/operator/config-api.md index 37026de6c..c25243e51 100644 --- a/modules/docs/src/main/mdoc/operator/config-api.md +++ b/modules/docs/src/main/mdoc/operator/config-api.md @@ -990,7 +990,10 @@ dotted-hosts = { # The time period within which the TCP binding process must be completed. # Set to `infinite` to disable. bind-timeout = 5s - + # A default request timeout is applied globally to all routes and can be configured using the + # akka.http.server.request-timeout setting (which defaults to 20 seconds). + # request-timeout = 60s + # Show verbose error messages back to the client verbose-error-messages = on } diff --git a/modules/mysql/src/main/scala/vinyldns/mysql/repository/MySqlBatchChangeRepository.scala b/modules/mysql/src/main/scala/vinyldns/mysql/repository/MySqlBatchChangeRepository.scala index d06959ba6..48458d09a 100644 --- a/modules/mysql/src/main/scala/vinyldns/mysql/repository/MySqlBatchChangeRepository.scala +++ b/modules/mysql/src/main/scala/vinyldns/mysql/repository/MySqlBatchChangeRepository.scala @@ -17,9 +17,9 @@ package vinyldns.mysql.repository import java.sql.Timestamp - import cats.data._ import cats.effect._ + import java.time.Instant import org.slf4j.LoggerFactory import scalikejdbc._ @@ -166,8 +166,8 @@ class MySqlBatchChangeRepository } def getBatchFromSingleChangeId( - singleChangeId: String - )(implicit s: DBSession): Option[BatchChange] = + singleChangeId: String + )(implicit s: DBSession): Option[BatchChange] = GET_BATCH_CHANGE_METADATA_FROM_SINGLE_CHANGE .bind(singleChangeId) .map(extractBatchChange(None)) @@ -181,12 +181,9 @@ class MySqlBatchChangeRepository .apply() batchMeta.copy(changes = changes) } - monitor("repo.BatchChangeJDBC.updateSingleChanges") { IO { - logger.info( - s"Updating single change statuses: ${singleChanges.map(ch => (ch.id, ch.status))}" - ) + logger.info(s"Updating single change status: ${singleChanges.map(ch => (ch.id, ch.status))}") DB.localTx { implicit s => for { headChange <- singleChanges.headOption @@ -194,8 +191,7 @@ class MySqlBatchChangeRepository _ = UPDATE_SINGLE_CHANGE.batchByName(batchParams: _*).apply() batchChange <- getBatchFromSingleChangeId(headChange.id) } yield batchChange - } - } + }} } } diff --git a/modules/portal/app/models/Meta.scala b/modules/portal/app/models/Meta.scala index b04e18cf0..a5db1af77 100644 --- a/modules/portal/app/models/Meta.scala +++ b/modules/portal/app/models/Meta.scala @@ -32,7 +32,7 @@ object Meta { Meta( config.getOptional[String]("vinyldns.version").getOrElse("unknown"), config.getOptional[Boolean]("shared-display-enabled").getOrElse(false), - config.getOptional[Int]("batch-change-limit").getOrElse(1000), + config.getOptional[Int]("api.limits.batchchange-routing-max-items-limit").getOrElse(1000), config.getOptional[Long]("default-ttl").getOrElse(7200L), config.getOptional[Boolean]("manual-batch-review-enabled").getOrElse(false), config.getOptional[Boolean]("scheduled-changes-enabled").getOrElse(false), diff --git a/modules/portal/app/views/dnsChanges/dnsChangeNew.scala.html b/modules/portal/app/views/dnsChanges/dnsChangeNew.scala.html index 712de04c2..4ca86c4c9 100644 --- a/modules/portal/app/views/dnsChanges/dnsChangeNew.scala.html +++ b/modules/portal/app/views/dnsChanges/dnsChangeNew.scala.html @@ -326,7 +326,7 @@ - +
See documentation for sample CSV
Limit reached. Cannot add more than {{batchChangeLimit}} records per DNS change.
@@ -336,6 +336,9 @@