I'm using Spark Job Server to run a Spark job and it works perfectly. But when I try to execute a big job (needs more than 40 sec) I get this error:
The server was not able to produce a timely response to your request.
Is there some configuration required in order to wait for the server answer? What should I do?
Thank you
There are several different timeouts that you can hit with sync job submissions. Yours is coming from Spray-can server. You can configure it through your conf
file:
spray.can.server {
idle-timeout = <set desired timeout>
request-timeout = <set desired timeout>
}
You can set both values to infinite
to disable these timeouts at all.
In general, there are at least 3 common different timeouts that I've observed and that can return your request before job completion:
timeout=Y
argument to your POST /jobs
request.idle-timeout
, request-timeout
. Will return default Spray response, making it harder to catch. They default to 60 and 40 secs respectively.In your Rest call, place(sync=false) at the end of the URL. Similar to http://server:8090/jobs?classPath=.... &sync=false at the end. It will start the job on the server and provide you a JobId.
The JobId can then be used to get the results:
For example: http://server:8090/jobs/b3b46a27-f711-469w-be09-4942006896b5
If that job is not finished, it will indicate the status as RUNNING. If it is finished, it will give you a status of FINISHED and the results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With