Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ LAPIS provides the following optional parameters:
If set, the landing page (`/`) will show a "Documentation" link to the provided value.
It is meant to point to your self-hosted version of this LAPIS documentation.
If not set, the "Documentation" link on the landing page (`/`) will not be shown.
- `--silo.infoTimeout`:
How long LAPIS waits when it asks SILO for its info (data version and SILO version),
e.g. `100ms`, `1s`. Defaults to `100ms`.

#### Starting LAPIS with Docker

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import org.genspectrum.lapis.logging.RequestContext
import org.genspectrum.lapis.logging.RequestIdContext
import org.genspectrum.lapis.response.InfoData
import org.genspectrum.lapis.util.YamlObjectMapper
import org.springframework.beans.factory.annotation.Value
import org.springframework.cache.annotation.Cacheable
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpStatus
Expand Down Expand Up @@ -92,6 +93,7 @@ open class CachedSiloClient(
private val requestContext: RequestContext,
private val config: DatabaseConfig,
private val rootAllocator: RootAllocator,
@param:Value("\${silo.infoTimeout:100ms}") private val infoTimeout: Duration,
) {
private val httpClient = HttpClient.newBuilder()
// Create our own thread pool explicitly to not use the ForkJoinPool.commonPool()
Expand Down Expand Up @@ -176,7 +178,7 @@ open class CachedSiloClient(
bodyHandler = BodyHandlers.ofString(),
tryToReadSiloErrorFromBody = ::tryToReadSiloErrorFromString,
) {
it.timeout(Duration.ofMillis(100)) // this should never take long, make sure we don't block anything else
it.timeout(infoTimeout)
it.GET()
}

Expand Down