Skip to content

Hangfire Hash.Key is too long #22700

Open
@gdlcf88

Description

@gdlcf88

Is there an existing issue for this?

  • I have searched the existing issues

Description

---> Microsoft.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated in table 'sqldb-my-project.HangFire.Hash', column 'Key'. Truncated value: 'recurring-job:HangfirePeriodicBackgroundWorkerAdapter<XxxxxxxxxxxxxxxxxxxxxxBackgroundWorker>.DoWor'.
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, 

The class name HangfirePeriodicBackgroundWorkerAdapter<XxxxxxxxxxxxxxxxxxxxxxBackgroundWorker> is too long due to the Adapter.

The max length of Hash.Key is 100 chars.
Image

A default RecurringJobId/BackgroundWorkerName without the "HangfirePeriodicBackgroundWorkerAdapter" keyword can solve this problem.

Reproduction Steps

No response

Expected behavior

No response

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

9.1.1

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions