I’m trying to run a daml script to create contracts on our test ledger using oracle for storage and using java SDK(daml-lf-1.8-archive-java-proto) connect for expose interfaces to the front-end.
Sometimes I got TIME OUT error when creating a contract. I’m not sure if it’s really a daml script issue or an issue with the network environment.
Would appreciate your advice!
request response:
java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: REQUEST_TIME_OUT(XXXX): Timed out while awaiting for a completion corresponding to a command submission.
springboot error log:
ERROR 37172 --- [nio-8090-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response] with root cause
java.lang.IllegalStateException: getOutputStream() has already been called for this response
daml error log:
[canton-env-execution-context-22] INFO c.d.p.a.services.ApiCommandService - REQUEST_TIME_OUT(3,f19c3ae8): Timed out while awaiting for a completion corresponding to a command submission., context: {participant: "XXX", readAs: [], parties: ["XXX"], submissionId: "XXX", actAs: ["XXX"], commandId: "XXX", err-context: "{definiteAnswer=false, location=ErrorFactories.scala:77}"}
[canton-env-execution-context-22] INFO c.d.c.n.g.ApiRequestLogger:participant=XXX - Request c.d.l.a.v.CommandService/SubmitAndWaitForTransaction by /XX.XXX.XXX.XXX:XXXXX: failed with DEADLINE_EXCEEDED/REQUEST_TIME_OUT(3,f19c3ae8): Timed out while awaiting for a completion corresponding to a command submission.
[canton-env-execution-context-70] INFO c.d.p.a.s.tracking.TrackerMap - Shutting down tracker for Key(MS004App,Set(XXX)) after inactivity of PT5M, context: {participant: "XXX"}
Thanks for your reply!
canton version: 1.0.0-rc
daml Sdk version :1.18.1
springboot(bindings-rxjava version:1.18.1, daml-lf-1.8-archive-java-proto version:1.18.1, java version: 1.8)
I have already upgraded the canton to 2.2.1,enabled debug level and triggered the Timeout error again. The log file is uploaded to the google dive: canton (2).log - Google Drive
Also, when we try to use memory only option, this timeout error wont happen. That means, it is something to do with the JDBC
Furthermore, can we modify the timeout time? How to do it? If I want to make the whole business process smoother, can I set the timeout time to a few seconds? Thanks for your help!
I got the time out error in canton log :
[0;39m[34mINFO c.d.c.n.g.ApiRequestLogger:participant=MS002 tid:c2132131cd83bea628ecb45a536ee887 - Request c.d.l.a.v.CommandService/SubmitAndWaitForTransaction by /10.233.103.231:41656: failed with DEADLINE_EXCEEDED/REQUEST_TIME_OUT(3,24f3cccf): Timed out while awaiting for a completion corresponding to a command submission.
This request has a timeout problem: tid:c2132131cd83bea628ecb45a536ee887
When we launch two requests at the same time, it’s easy to timeout. After I changed this value (storage.max-connections) to 2000 in canton.conf, it does not time out when 5 requests are triggered at the same time. In our other test environment, storage.max-connections is 4, and 50 requests are triggered at the same time without any problem. storage.max-connections does not seem to be set to a large number, what is the root problem? How can I optimize it?
We redownload the log file which contain the timeout error, please see this in attachment.canton.zip - Google Drive
we find the time out error in log file as below:
2022-07-19 06:29:08,499 [canton-env-execution-context-161] INFO c.d.p.a.services.ApiCommandService - REQUEST_TIME_OUT(3,a3fcac8d): Timed out while awaiting for a completion corresponding to a command submission., context: {participant: "MS002", readAs: [], parties: ["ExpoProAdmin::12203ad0d871ab3ef01815843d727518a74bb046bd3d6084e29b06c63b1f62de083f"], submissionId: "a3fcac8d-9b81-4f09-b2ab-3842cc679814", actAs: ["ExpoProAdmin::12203ad0d871ab3ef01815843d727518a74bb046bd3d6084e29b06c63b1f62de083f"], commandId: "83660b36-632e-4db9-82fb-f49f933e43dc", err-context: "{location=CompletionResponse.scala:121}"}
2022-07-19 06:29:08,509 [canton-env-execution-context-161] INFO c.d.c.n.g.ApiRequestLogger:participant=MS002 tid:dceb664577d23208d8f52880b68d002c - Request c.d.l.a.v.CommandService/SubmitAndWaitForTransaction by /10.233.79.163:52688: failed with DEADLINE_EXCEEDED/REQUEST_TIME_OUT(3,a3fcac8d): Timed out while awaiting for a completion corresponding to a command submission.
We plan to add a retry mechanism, but the current timeout is a bit long, how can we set the timeout to half a minute to speed up the retry pace? We found the timeout related parameters as below in the documentation, but we don’t know how to change them properly, please help guide us how to change the timeout to 30 seconds. Thank you!