to get a personalized navigation.
to get a personalized navigation.
We struggle with many timeouts towards Visma API.
This relates to the following endpoints:
What is the suggested or recommended timeout?
Is it normal to have approximately 20% timeouts?
Hi,
Could you please share some instances of the timeouts? Timestamps, ipp-request-id, company-id and endpoints.
Do you have a timeout in place on your side?
How long time generally passes before a timeout?
Company-id: 2749986
Request 1:
timestamp: 2020-08-30T21:20:25.141+02:00
endpoint: https://integration.visma.net/API/controller/api/v1/salesorder
Request 2:
timestamp: 2020-08-30T21:31:00.486+02:00
endpoint: https://integration.visma.net/API/controller/api/v1/salesorder
I do not log the ipp-request-id, but if you need it to find the request I can get it.
I have not defined a timeout yet, but if necessary I will add it to the restTemplate. But from what I see the timeout occurs after approximately 10 seconds.
I can also add that, for POST request the operation is added in Visma, but due to the timeout I can not be sure about the result.
PUT/POST orders often take a long time even for a small number of rows.
Use a long timeout (minutes), at least for POST/PUT, instead of messing with retries. It is very rare for calls getting lost.
Thanks for the clarifications. I will try to increase the timeout.
The timestamps I have provided is from our ISV environment, I am not sure where to find the client Id, but the company Id is 2749986
Could you please provide us with the company id as well as yout api clientID and we'll have a look at the timeouts in out logs.
Thank you.
>Could you please provide us with the company id as well as yout api clientID and we'll have a look at the timeouts in out logs.
Just curios, how do you plan to see client side timeouts in the server log?
Hi,
We would reccomend that you log the request ID as it helps for us to find the request in our logs.
What is the full exception message?
Some timeouts are to be expectred, have you implemented a retry function?
The problem getting the request Id in the instance of timeout is that no response is provided from Visma.
I performed another test at: 2020-08-31T12:00:29.377+02:00
Two salesOrder POST requests was tried, when one of two failed. The request ID for the successfull one is 928a724c-eb18-43e4-8ed3-a0c86f1f9456. The other one at this timestamp timed out.
The exception message: Failed to send SalesOrder to Visma with message 'I/O error on POST request for \"https://integration.visma.net/API/controller/api/v1/salesorder\": timeout; nested exception is java.net.SocketTimeoutException: timeout'"
Error HTTP Response with status: 504, body: null
Body of the failed request:
{\"currencyId\":{\"value\":\"NOK\"},\"lines\":[{\"operation\":\"insert\",\"inventoryNumber\":{\"value\":\"P-208\"},\"quantity\":{\"value\":6.0}}],\"customer\":{\"value\":\"DAM10206\"},\"orderType\":{\"value\":\"SO\"},\"date\":{\"value\":\"2020-08-11\"}}
Yes I have implemented a retry function that handles exceptions of type HttpStatusCodeException, but this timeout returns IOException, and I can not be sure if the request is processed by Visma. How I handle this at the moment, is to just accept this timeout for POST requests, and continue. This way all requests (so far) has ended up in Visma, but This is not a robust solution.
Try to increase the timeouts and see if it helps.
What you can do to make sure the objects does not exist is to PUT -> If statuscode is 404 POST it, if you receive the exception, retry PUT etc.
Copyright © 2022 Visma.com. All rights reserved.