0

I have a trained model that I can deploy without trouble. However, querying the API will receive the response:

The server was not able to produce a timely response to your request

A simple google search (and past experience) tells me that this is Spray telling me that the response has taken too long. I want to be able to increase the timeout but I can't find how to configure the engine.

Any idea how I can change the configuration used by an engine?

Jake Greene
  • 5,539
  • 2
  • 22
  • 26

1 Answers1

1

From Spray documentation:

# The time after which an idle connection will be automatically closed.
# Set to `infinite` to completely disable idle connection timeouts.
idle-timeout = 60 s

# If a request hasn't been responded to after the time period set here
# a `spray.http.Timedout` message will be sent to the timeout handler.
# Set to `infinite` to completely disable request timeouts.
request-timeout = 20 s

There are also some other timeout related settings, that you might want to adjust.

TeWu
  • 5,928
  • 2
  • 22
  • 36
  • and where do I put this configuration? In the application.conf under src/resources? The pio documentation doesn't mentioned configuration outside of what can be passed to `pio train` – Jake Greene May 14 '16 at 12:42
  • @JakeGreene Typically you should put something like `spray.can { server { request-timeout = 20 s }}` to `src/main/resources/application.conf`, and it should work. Which engine template are you using? – TeWu May 14 '16 at 15:37