Memory Leak 8.2.2 when using Odata to communicate with Business Central
Open
@corranrogue9 is already working on this.
Since Dec 10, 2024.
bug
P1
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Our project is using .NET8
Odata 8.2.2
When running our project, each time the code does retrieves or saves data in Business Central through Odata the memory usage goes up without ever coming down:
var newOrderQuery = new DataServiceCollection<MtSalesInvoice>(_mtApiContext.MtSalesInvoices.Where(s => s.Id == new Guid("11111111-1111-1111-1111-111111111111")));
var newOrder = new MtSalesInvoice();
newOrderQuery.Add(newOrder);
newOrder.CustomerNumber = existingCustomer.Number;
newOrder.InvoiceDate = DateTime.Now.Date;
newOrder.UniqueReference = locator;
newOrder.IsMarkedForInvoiceCheck = operation.Order.IsMarkedForInvoiceCheck;
_mtApiContext.SaveChanges(SaveChangesOptions.PostOnlySetProperties);
_mtApiContext.Detach(newOrderQuery);
looking at memory heap most of it not all memory is being taken by Odata.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.