View Issue Details

IDProjectCategoryView StatusLast Update
0024302mantisbtdb mssqlpublic2018-04-29 19:21
ReporterJose LozanoAssigned Tocommunity 
PriorityhighSeveritymajorReproducibilityunable to reproduce
Status closedResolutionno change required 
Product Version2.12.0 
Target VersionFixed in Version 
Summary0024302: The consecutive ID of incident record number is skipped, sometimes one 3 times and sometimes 4 consecutive. it does not throw er
Description

Good morning,

I need your help, since it is happening to me that when several users are working on Mantis, from one moment to another the consecutive ID number of incidence record is skipped, sometimes one sometimes 3 and sometimes 4 numbers, losing the control and follow up. I would like to know if someone has happened to him, why it happens and how it can be solved.

I appreciate the help.

TagsNo tags attached.

Activities

atrol

atrol

2018-04-18 02:24

developer   ~0059579

I am not complete sure if I understand your problem.
Does it mean your issues are not numbered 1,2,3,4, ... but something like 1,4,7,10, ...?

If so and if you are using MySQL, check database auto_increment settings.
Do this by running the following statement SHOW VARIABLES LIKE 'auto_inc%' ;

Jose Lozano

Jose Lozano

2018-04-18 08:13

reporter   ~0059584

Hello, thank you for your quick response. but the problem is that he is numbering well, with the consecutive one at a time, but from one moment to the next he increases the numbering, for example he jumps from 192 to 196 and the numbers 193-194-195 are lost and when looking for them He says they do not meet. If I use MYSQLExpress. I appreciate your guidance.

atrol

atrol

2018-04-18 08:37

developer   ~0059585

for example he jumps from 192 to 196 and the numbers 193-194-195 are lost

Isn't this what I wrote before?

but something like 1,4,7,10,

What's the output of SHOW VARIABLES LIKE 'auto_inc%' ; ?

If all displayed values are 1, you have to provide the additional information listed below

  • Exact version ofPHP, Database, Web server, Browser and Operating System
  • Relevant customizations (e.g. changes in config_inc.php, etc)
  • Installed plugins or custom functions ?
  • Was the MantisBT source code modified in any way ?
Jose Lozano

Jose Lozano

2018-04-18 09:10

reporter   ~0059586

Last edited: 2018-04-18 09:11

View 2 revisions

• Exact version of PHP, 7.1.7 Database, IIS Web server, Browser Chrome and Operating System Windows Server 2012
• Relevant customizations (e.g. changes in config_inc.php, etc). Only custom fields and customizations of the Mantis and time zone were added.
• Installed plugins or custom functions? you do not have plugins installed.
Was the MantisBT source code modified in any way? The source code was not modified.
. I do not know how to run SHOW VARIABLES LIKE 'auto_inc%'; Can you tell me how to execute it?

Thanks

atrol

atrol

2018-04-18 09:26

developer   ~0059587

Still missing a clear information about your database.
Is it MySQL?
If so, you should execute the statement in the MySQL client you are using (mysql command line, phpMyAdmin, MySQL Workbench, ...)

Jose Lozano

Jose Lozano

2018-04-18 09:38

reporter   ~0059588

Is SQLEXPRESS

atrol

atrol

2018-04-18 09:51

developer   ~0059589

Sorry I can't help as I don't use this database.

I recommend to use MySQL or MariaDB as most of the Mantis developers and users are using it.

Jose Lozano

Jose Lozano

2018-04-18 09:54

reporter   ~0059590

I appreciate your collaboration, guidance and the time you have dedicated me. have a happy day.

dregad

dregad

2018-04-18 12:33

developer   ~0059594

Hello,

This not a MantisBT issue. The sequence numbers are assigned by the RDBMS. I believe you're most likely facing a known issue with SQL server, see

https://stackoverflow.com/questions/14146148/identity-increment-is-jumping-in-sql-server-database

I'm sorry, but there is absolutely nothing that we can do about it.

Also, please note that having non-sequential issue IDs is technically not a problem - The ID is just that - a unique identifier; you would also have gaps e.g. if you have multiple projects (issues are unique across the whole instance) or if you delete issues.

obmsch

obmsch

2018-04-18 14:18

reporter   ~0059595

@dregad all you said about non-sequential Ids is right, but the stackoverflow link
describes a well known issue with identity caching and sqlserver restarts, and I think
is unrelated to the issue Jose has (those jumps are +1000). This looks more like a
problem with concurrent submits, due to a misconfiguration (IIS, PHP, FastCGI) or a
deeper problem on the db api level. I never had such a problem in a comparable
environment, but I am the only user. Will try to simulate concurrent submits over the
weekend and check whats happening then.

Jose could you please provide additional info about:

  1. SQLSERVER (EXPRESS) Version
  2. IIS Version
  3. PHP Version (32/64, ts/nts), FastCGI?
  4. Does this only happen when several users submit issues simultaneously?
  5. Is this only a "id counting" problem or are issues lost, wrongly linked?
  6. Are there any abnormalities in the bug or bug_text table (use SSMS to check) for your jumps?
Jose Lozano

Jose Lozano

2018-04-18 14:52

reporter   ~0059596

Dregad and obmsch, I appreciate your interest in supporting me and in your effort to try to solve my problem.

attached the requested information:

1.SQLSERVER (EXPRESS) Version: SQL 2012 Express.
2.IIS Version: IIS 8.5
3.PHP Version (32/64, ts / nts), FastCGI? 7.1.7 64 BITS 4. .Does this happen when several users submit issues simultaneously ?: I have not been able to determine if it is when there are several users connected or registering. The truth is that there are always several users connected to the time verifying their cases.
5.Is this only a "id counting" problems or are lost issues, wrongly linked ?: No problems are lost that are already registered, it's just that the consecutive ID is skipped, sometimes 1 or sometimes 4 consecutive times.
6.Are there any abnormalities in the bug or bug_text table (use SSMS to check) for your jumps? there is none

Again to the two thanks for all your bearings.

obmsch

obmsch

2018-04-18 16:34

reporter   ~0059597

Jose, as said I will try to reproduce what you are seeing in my environment, but
I am not sure about your answer to my question 5:

5.Is this only a "id counting" problems or are lost issues, wrongly linked ?: No
problems are lost that are already registered, it's just that the consecutive ID
is skipped, sometimes 1 or sometimes 4 consecutive times.

You are talking about already registered issues, I was asking for new submits (issues)
I have no idea about the environment your tracker is running in (internal/external),
but do you have any feedback from users having problems to submit a new issue?
Are the jumps equally observable on related tables (bug_text)? Are there any
entries in bug_text not referenced in bug?

obmsch

obmsch

2018-04-22 05:06

reporter   ~0059628

Completed run tests with the following setup:
Win10(1709), IIS10, MSSQLEXPESS 2016, PHP7.1.16, MantisBT 2.13.1, php_sqlsrv 5.2.0
Created project 'RestTest' and four users 'restuser1'..'restuser4' (all reporters)
with api tokens. Concurrently run a rest client application for each of them, submitting
1000 issues in a loop (sums up to 4000).
Result: All issues created with consecutive ids, no gaps/jumps.

Setting up the test environment I ran in a couple of problems. I put them here and let
the devs decide how to proceed.

  1. htaccess equivalant web.config for IIS is missing in api/rest

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <rewrite>
      <rules>
        <rule name="imported rule" stopProcessing="true">
          <match url="^" ignoreCase="false" />
          <conditions>
            <!--# Based on Slim Framework recommendation @ http://docs.slimframework.com/routing/rewrite/-->
            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php" appendQueryString="true" />
        </rule>
      </rules>
    </rewrite>
    </system.webServer>
    <location allowOverride="true"/>  
    </configuration>
  2. I don't use email notification, but my config_inc.php was lacking '$g_enable_email_notification = OFF;'.
    This completely stalled MantisBT and I got 'timeouts' in the rest client application after an arbitrary
    number of submitted issues. Alas this is a configuration problem, the api should handle this more
    gracefully.

dregad

dregad

2018-04-23 07:17

developer   ~0059645

htaccess equivalant web.config for IIS is missing in api/rest

Follow-up in 0024347

'timeouts' in the rest client application after an arbitrary number of submitted issues

Just to be sure, you was that due to the e-mail queue filling up and not being processed ?

obmsch

obmsch

2018-04-23 08:21

reporter   ~0059646

@dregad the rest request time out (iis time out). Looked like internal processing doesn't finish. The email table
had 30 or so entries at that point. For me myself notifications were off ($g_email_receive_own = OFF;), so I didn't
encounter that before.

atrol

atrol

2018-04-29 10:00

developer   ~0059703

Setting to resolved as this is not a Mantis but a database issue.

Thanks @obmsch for your support.

Issue History

Date Modified Username Field Change
2018-04-17 13:25 Jose Lozano New Issue
2018-04-18 02:24 atrol Status new => feedback
2018-04-18 02:24 atrol Note Added: 0059579
2018-04-18 08:13 Jose Lozano Note Added: 0059584
2018-04-18 08:13 Jose Lozano Status feedback => new
2018-04-18 08:37 atrol Status new => feedback
2018-04-18 08:37 atrol Note Added: 0059585
2018-04-18 09:10 Jose Lozano Note Added: 0059586
2018-04-18 09:10 Jose Lozano Status feedback => new
2018-04-18 09:11 Jose Lozano Note Edited: 0059586 View Revisions
2018-04-18 09:26 atrol Status new => feedback
2018-04-18 09:26 atrol Note Added: 0059587
2018-04-18 09:38 Jose Lozano Note Added: 0059588
2018-04-18 09:38 Jose Lozano Status feedback => new
2018-04-18 09:48 atrol Category administration => db mssql
2018-04-18 09:51 atrol Note Added: 0059589
2018-04-18 09:54 Jose Lozano Note Added: 0059590
2018-04-18 12:33 dregad Assigned To => dregad
2018-04-18 12:33 dregad Status new => resolved
2018-04-18 12:33 dregad Resolution open => no change required
2018-04-18 12:33 dregad Note Added: 0059594
2018-04-18 14:18 obmsch Note Added: 0059595
2018-04-18 14:29 atrol Assigned To dregad => community
2018-04-18 14:29 atrol Status resolved => feedback
2018-04-18 14:29 atrol Resolution no change required => reopened
2018-04-18 14:52 Jose Lozano Note Added: 0059596
2018-04-18 14:52 Jose Lozano Status feedback => assigned
2018-04-18 16:34 obmsch Note Added: 0059597
2018-04-22 05:06 obmsch Note Added: 0059628
2018-04-23 07:17 dregad Note Added: 0059645
2018-04-23 08:21 obmsch Note Added: 0059646
2018-04-29 10:00 atrol Status assigned => resolved
2018-04-29 10:00 atrol Resolution reopened => no change required
2018-04-29 10:00 atrol Note Added: 0059703
2018-04-29 19:21 vboctor Status resolved => closed