Issue number jumping on increments of around a thousand when rebooting service.
Added by Daniel Schulz 3 months ago
Im running a redmine instance locally where different users are creating issues as tickets with some custom fields involved. When rebooting the database and application we are getting jumps in different increments but they end up landing in the same termination:
For example we create issues one through eight normally but then after rebooting we ended creating another one and that ends in 2003, then we created five more so we end up in 1008 but after a second reboot we jump again to 3003. and so on. we are running redmine in ms sql express and the most common reason for this issue seems to be identity caching for the ticket number column but we already turned identity cache off and it does not seem to help.
Are there any other fixes for this? we dont have thousands of users so this is a creation problem ocurring on a redmine/database level.
Replies (1)
RE: Issue number jumping on increments of around a thousand when rebooting service.
-
Added by Redmine Forge 3 days ago
Hello Daniel,
The usual catch is that IDENTITY_CACHE is a per-database setting, so it has to be turned off inside the Redmine database itself, not in master:
USE redmine; -- your Redmine database name
ALTER DATABASE SCOPED CONFIGURATION SET IDENTITY_CACHE = OFF;
SELECT name, value FROM sys.database_scoped_configurations WHERE name = 'IDENTITY_CACHE';
The last line should show 0. If you're on SQL Server older than 2017, use the server-wide startup flag -T272 instead (SQL Server Configuration Manager → your instance → Startup Parameters), then restart the service.
The gaps that already exist stay; this only stops new ones. Issue numbers are just IDs, so gaps don't break anything in Redmine.
Best regards,
Jogger, Redmine Forge · redmineforge.com