CustomerID jumps from 1 to 591 for only 8 registred users

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi,

I have nopcommerce 2.30 installed and I was wondering if somebody can explain me why the id's of registred users jumps from 1 to 591.
For example:

Id  Customer rols

591  Registered
468  Registered
458  Administrators, Forum Moderators, Registered
377  Administrators, Forum Moderators, Registered
358  Registered
350  Registered
205  Registered
1  Administrators, Forum Moderators, Registered


as you can see I have 8 users registred and the id's begins from 1 to 591. Is this how nopcommerce work or does something else go wrong here? I expect if the Id starts at 1 then the next Id will be 2 and so on. Can anybody explain why this is not the case?

Best regards,
Mo
12 years ago
Unregistered guests get a Customer entry so that they can put things in their shopping cart.
12 years ago
is this the reason why the Id's jump for registred users? I assume what you are saying that this is normal and that this can not be changed in nopcommerce? So I don't have to worry about anything is wrong here.

Thanks for your reply
12 years ago
Yes, it's by design.  The unregistered guests are each taking a CustomerId and eventually getting deleted by the scheduled task.
12 years ago
Thank you for help mate.

Best regards,
TheMo
12 years ago
It creates different guest customer in database even if the request is coming from same IP. So if a guest visits 100 pages from his machine, it creates 100 customer records. Is that desirable? or its happening due to some setting (cookie disabled) at the client?
Note: If you login as guest, delete cookies, again come to website as guest; it will show you 2 different users from same IP in current online users. And in registered users also it creates 2 different guest users. This is still fine. But if someone has cookies disabled, will it keep creating separate guest record for each page visit?
11 years ago
But this is is a big problem.

In my case, in less than a week, the number have jumped from 1... to over 250.000

I am afraid that in some months the CustomerID is going to OVERFLOW.

I suppose that it is mainly due to robots that are visiting the website but ... what can be done to avoid CustomerID to grow so fast?

Thanks
11 years ago
I believe New York wrote a function to not give Customer records to the search spiders.  That will probably help a lot.  

If you do happen to get your CustomerID up to 2,147,483,647, you can just convert it to a bigint.  The limit on that is 9,223,372,036,854,775,807.

You might have to make that change across all your tables because Id is in the BaseEntity class.  I think you would just change Id to Int64 (or long?) and run an alter script to change the Id on your tables.

You could possibly also reset the seed for Id on Customer because there will be a lot of deleted records.
11 years ago
FEATURE REQUEST: I think it would be great if instead of having to go through the suggestions above, if nop looked through the database for ID's not in use and assigned from the beginning again instead that way after the scheduled task runs and cleans up some of the unregistered user id's they could be used again. I think if this could be done for a 24 hour period that would be best. Maybe a scheduled task?
11 years ago
Has it actually been an issue for anyone yet?  I know Twitter had to change to bigint but I'd guess there are a lot more tweets than guests coming to anyone's Nop store.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.