Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I increase timeout of sidecar seldon container? #196

Closed
codebreach opened this issue Aug 1, 2018 · 12 comments
Closed

How do I increase timeout of sidecar seldon container? #196

codebreach opened this issue Aug 1, 2018 · 12 comments

Comments

@codebreach
Copy link

We see the following error as one of our predictors takes a while (10+ sec)

But it seems that the sidecar that manages these connections has a fixed timeout in the code somewhere. Ideally we should allow this to be configured somewhere?

{
    "code": 203,
    "info": "org.springframework.web.client.ResourceAccessException: I/O error on POST request for \"http://0.0.0.0:9000/predict\": Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out",
    "reason": "Microservice error",
    "status": "FAILURE"
}
@codebreach
Copy link
Author

Looking at the code

It seems that its hardcoded

private static final int DEFAULT_SOCKET_TIMEOUT = 2000;

@ukclivecox
Copy link
Contributor

Yes, you are right ; we are working on functionality to allow configuration via annotations in the SeldonDeployment CRD so these things can be configurable.

@codebreach
Copy link
Author

Is there an PR that has the code? we can dogfood it because its preventing us from deploying to production.

we can also help implement if required.

@codebreach
Copy link
Author

also @cliveseldon would it be possible for us to fork the repo and update the hardcoded value and use that...like can we tell seldon to use a different image/tag for the sidecar?

that way we can do a quick and dirty change while you guys make the required changes to the CRD etc.

@codebreach
Copy link
Author

seems that if we can somehow set the property
io.seldon.clustermanager.engine-container-image-and-version=${ENGINE_CONTAINER_IMAGE_AND_VERSION}

it will work.

any guidance?

@ukclivecox
Copy link
Contributor

Yes, there are a few things:

The timeout will be in the API FrontEnd Gateway AND the Seldon Engine (service orchestrator), so you would need to hack both of those. Yes, you can change the engine version from the Helm values.yaml.

name: seldonio/engine:0.2.3-SNAPSHOT

I will do a premlinary PR with the code for the annotations as well. Happy to have help on working on this.

Please contact me on our Slack channel.

@ukclivecox
Copy link
Contributor

The PR #197

@ukclivecox
Copy link
Contributor

This should be fixed in the latest snapshot development release by the PR #211
If you use images for 0.2.3-SNAPSHOT you can test. See
docs and
example.

Please test and tell us if it fixes your requirements.

@codebreach
Copy link
Author

codebreach commented Aug 30, 2018 via email

@codebreach
Copy link
Author

This doesn't work behind ambassador
timeout_ms is not set on the service generated even though we pass the annotations

kind: Service
metadata:
  annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v0
      kind:  Mapping
      name:  seldon_dpa_rest_mapping
      prefix: /seldon/dpa/
      service: dpa:8000
      ---
      apiVersion: ambassador/v0
      kind:  Mapping
      name:  dpa_grpc_mapping
      grpc: true
      prefix: /seldon.protos.Seldon/
      rewrite: /seldon.protos.Seldon/
      headers:
        seldon: dpa
      service: dpa:5001

it should include

      timeout_ms: VALUE_FROM_ANNOTATION

@codebreach
Copy link
Author

please let me know if i should open a new issue

@ukclivecox
Copy link
Contributor

Can you add your case to #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants