Skip to content

SqlException: The server supports a maximum of 2100 parameters. #704

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

Closed
Damnias3 opened this issue May 2, 2025 · 5 comments
Closed

SqlException: The server supports a maximum of 2100 parameters. #704

Damnias3 opened this issue May 2, 2025 · 5 comments

Comments

@Damnias3
Copy link

Damnias3 commented May 2, 2025

Which component is this issue related to?

Umbraco Commerce (Core)

Which Umbraco Commerce version are you using? (Please write the exact version, example: 10.1.0)

13.2.0

Bug summary

When selecting 600 orders per side, in Commerce - ShopName- Orders, and want to export them i get this error. Its a new export template im using here, so not one of the default templates.

Microsoft.Data.SqlClient.SqlException (0x80131904): The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.

Is it something i myself could fix, or is it somewhere in the Umbraco Commerce package this error happens?

Don't know if this information has anything to do with, but we have 17 orderline properties.

Best regards Daniel

Specifics

No response

Steps to reproduce

Login to Umbraco
Select Commerce in top bar.
Find the shop with the orders you want to export.
Select Orders
Scroll down to the bottom, select 600 in the dropdown, that defaults says 30.
Press export in the top bar, and select which template to use.

Expected result / actual result

No response

Dependencies

No response


This item has been added to our backlog AB#52583

@Damnias3 Damnias3 added the bug Something isn't working label May 2, 2025
@mattbrailsford
Copy link
Contributor

Hi @Damnias3

I've pushed a 13.2.2--preview.5 build to our nightly feed with a fix that fetches items in groups of 150 to prevent too many arguments in the SQL statements. This should fix your current issue, though I imagine if you do export A LOT, you may start hitting memory exceptions so there will have to be a limit somewhere, but this should at least get you more than you are currently getting.

If you could test and let me know it resolves your problem, that would be great.

@Damnias3
Copy link
Author

Damnias3 commented May 5, 2025

Sounds good.

Just talked with my boss, and i'm not getting the green light to push this nighty change to our production environment, when it's a more official release we will gladly update our environments.

So unfortunately i can't test this update.

And its a little difficult to test if the update because its only happening on our production environment. And again not getting the green light to update our development and qa envrionments with production data to test this.

@Damnias3
Copy link
Author

Damnias3 commented May 5, 2025

Hi again @mattbrailsford

Forget my last message.

I just found a backup of our production database and updated it to 13.2.2-preview5. And now the 600 orders export work.

So i will say the fix in 13.2.2 works.

@umbracotrd
Copy link

Thanks for the confirmation, @Damnias3. We'll schedule the official release of 13.2.2 for tomorrow.

@umbracotrd
Copy link

13.2.2 is out now

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

No branches or pull requests

3 participants