Hi, we have the case where the IDs of the user table reaches its limit. The field has the type int(11).
Does there exists a tool to compact the IDs.
We have only 300.000 users. But somehow are users registering and then deleting themselves and their data again. I guess bots or hackers. The result is big gaps of 100.000 or more not used IDs between long time use users.
We know how to do this manually, but maybe there already is a tool for fixing the situation.
@Andrew_es Are you sure that there is not some other reason for this? A subscriber is not able to delete themselves, so if you have had lots of fake subscriptions they would still be in the database. There must be manual actions by an admin to delete subscribers.
I think that an int is a signed 32 bit field so hitting the maximum value would take one subscription each second for 68 years.
Could this be when they move the system and reimport the DB ?.. I don’t expect it to be at updates of phpList. But there could be other reasons the admins move the system and reimport the DB.
@Andrew_es I guess that there is a process importing subscribers that is causing the auto increment field to increase. There are some mysql statements that will increment the field even though a subscriber was not successfully added such as “replace into” and “insert … on duplicate key update”.
I suggest raising this with your system administrator/database administrator.
No, I meant that they might be able to explain what is causing the ID column to keep changing. Possibly a backup/restore that is incorrect or importing new subscribers that also is not working as intended.
I concur with Duncan. I have millions of subscribers in phpList, and and never run out of id’s.
There are those tools in the web interface (check db structure, re-index database). That has helped me occasionally, it’s just something to do if you haven’t done it already.
It might take some ‘fancy footwork’ to correct… you would need to keep all the id values in every table where it’s used sync’ed… at which time you could reset the userids to be contiguous, and set the autoincrement value in the user_user table to the proper value (highest autoincrement value +1).
Do your experimenting on a backup copy of the database (not the live copy).