Docker container BC v24 API timeout with large result set

2 minute read

TL;DR if you create your bc v24 container in isolation mode hyperv and do not use SSL, you will not receive a response to API calls that return more than 50-60 result sets. You can avoid this issue by using SSL or using isolation mode process.

It’s been a while since my last blog post. As you may know, BC v24 has been released. I noticed that new BC APIs have been created. Woulnd’t be too much effort to add them to the Postman Collection1, …right? 😏 Well, this is where the fun begins! 😁

The first thing I’ve noticed is that I can not get a request through. I want to get the list of accounts. The request gets stuck. No answer. After 5 minutes, the request eventually times out.

postman request

Ultimatley resulting in a bottleneck for all the otter requests as you can see in the event log of the container. The APIs which can usually be handled (<50-60 results) have to wait.

event log

Detailed information can be found under Operational limits.

The picture in the header is the script I am using for the last couple of months. I am using BcContainerHelper v6.0.15. Never had a problem with the v23 APIs. But now suddenly they don’t work as expected in a BC v24 container, or at least some of them.

Surprisingly in the Business Central Launch Event2 was mentioned that FindSet will be used for >50 rows. This is roughly the same range as our timeout issue. Remains to be seen if this is related, as I have not taken the time to analyze the cause of this problem and hope that this is only a temporary issue and will be fixed in the future.

youtube bcle faster odata data loading

Source: https://www.youtube.com/watch?v=VpNQ-CYNrkM&list=PL1FESh9FqyhSjW63Ouft5vbc2NSxXKV2k&index=39&t=263s

Afaik, there are currently two solutions to this particular problem:

  • either stay with isolation mode hypver, but use ssl

or

  • switch to isolation mode process

Hope you learned something new.

See you around 🦦

Update

I’ve created a custom table with 3 fields (id, name and age) and inserted 50 records. Now insert 1 record step by step and send an http request in between. The GET requests run smoothly up to 58 records. If you increase the number by 1 more, it no longer responds and leads to a timeout.

To give you an example what this looks like, see the following animation.

example

Adding one more field to the custom table and the custom api, the timeout now appears at 57 records, so it’s not just the number of records that matters, but also the size of the data.

example 2