DapperLib / DapperLib/Dapper

Error when trying to enter a parameter with 90 characters

Open
#1,676 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-info
Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

I'm using dapper version X, and when trying to execute a stored procedure through the QueryFirstOrDefault command, I get the error "A transport level error occurred while receiving results from the server. (provider: TCP Provider, error: 0 - Semaphore timeout expired.) ".
Doing some tests I identified a situation, when a certain parameter is sent with 90 characters it gives this error, I changed the parameter to send 89 characters and it worked, I changed it to send 101 characters and it worked. I could only send 90 characters by setting the size parameter to 65536 of the DynamicParameter object, otherwise, without success

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the QueryFirstOrDefault stored-procedure call with 89-, 90-, and 101-character parameters, comparing the behavior with and without DynamicParameter size 65536. Inspect Dapper's parameter-size handling and define done as making the 90-character case work without the size workaround, with regression coverage for the boundary behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.