I have a java API (accepting HTTPS requests_ packaged into a docker image, and then it is deployed using k8s cluster on top of EC2s. The master EC2 has an ELB in front.
I can make curl POST requests to the ELB in order to hit that java API.
Sometimes my curl request sits waiting for a response forever even though when i see the kube logs the processing was successful.
This happens for larger requests around 40mins, requests of 25mins are getting a response ok.
Where do you think the timeout could be? any specific config params i should look at?
client (curl) --> ELB --> k8s --> pod running a java api image
i thought this would be relevant (i am not setting IdleTimeout) for ELB but docs say default is 60s, although i can get response for 20min requests "ConnectionSettings": { "IdleTimeout" }
Just as Pampy mentioned in his answer, the ELB timeout counts only the Idle time. This can range between 1 and 4000 secs and is set to 60 secs by default. You can change the timeout using the CLI or the console.
The following is an example of using the CLI to change it to 5 mins:
aws elb modify-load-balancer-attributes --load-balancer-name my-loadbalancer --load-balancer-attributes "{\"ConnectionSettings\":{\"IdleTimeout\":300}}"
Source: docs
As you are uploading big files taking 20-40 mins, I would still recommend the other suggestions about using a message broker like RabbitM or Kafka to handle the upload and processing asynchronously.
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