Closed Kamagigan closed 1 week ago
Thanks a lot for reporting this! For some reason Dapper is unable to fetch the parameter name correctly from the pair.Key
property, leading to error.
However, it looks like it works fine in one environments, and doesn't in others, because tests never failed on my machines or on build server ones. I tried to also check with the newest Microsoft.Data.SqlClient
package, but all the tests also passed. I will submit the fix as soon as possible regardless of reproduction anyway and ensure other parameters are populated explicitly.
By the way, do you use trimming in your application, e.g. whether you have <IsTrimmable>true</IsTrimmable>
in your csproj file?
Hello,
We have an hangfire server running inside a console App in .Net 8 connected to a SQL Server with hangfire database schema version 9 in it. We use the following Nuget packages :
With the version 1.8.14 of hangfire, everything runs fine with no errors. We can enqueue jobs, hangfire server process it and if there is an exception in jobs processing, we have the AutomaticRetry attribute to retry these jobs.
When the package version 1.8.15 have been publish, we have updgraded it in our application and since there, each time we start the server and wait around 30 seconds we got two same exceptions (full exception stack in the end) :
Execution RecurringJobScheduler is in the Failed state now due to an exception, execution will be retried in no more than 00:00:25 Microsoft.Data.SqlClient.SqlException (0x80131904): La variable scalaire "@key" doit être déclarée. (Must declare the scalar variable "@key)
After these exceptions, Hangfire keep running. If a job is enqueued in hangfire db, the server process it with success. But if an exception occurs during the job proccessing, Hangfire is unable to retry this job and it stay in SCHEDULED state forever. and we must renqueue manually the job to retry it.
For troubleshooting this issue, i tried to reduce the options used to isolate and find one probematic with no result. I tried to recreate the hangfire database still with no result.
Finally, i tried to rollback to the version 1.8.14 and everything resume to working fine with no exceptions and retries working fine.
Do you have any ideas, how to resolve this issue ?
I have attached a log exemple : hangfire-server-exception.txt
Best Regards
Full Exception :