What happens if a profile fails to load its associated data due to a failed DataStore call on :LoadProfileAsync()? Does ProfileService have retries? If not (or if all retries also fail), does :LoadProfileAsync() just return nil, or does it return a profile flagged as a backup (using default data) and thus will never attempt to write that data to the actual DataStore like DataStore2?
From my understanding of the source code, LoadProfileAsync will retry indefinitely until the DataStore call succeeds. Is this correct?
Is it possible to store an object (instance created by a class) into profile ?
If not how is it possible to serialize it since its actually auto saving ? it seem like it would be quite messy to do it
But when to recreate this object since the purpose of profileservice is to have data always safe in profile ? It seem impossible to do it with an oop way, if i save the data of the object only then it feel like iam simply using a module script right? thats seem like its not worth the hassle to make a simily oop with this
I seem to be losing data everytime the server is shutting down, disconnected, or ROBLOX kicks them out. It works fine when they leave themself, but not on those events. Any idea?
I’ve been having this issue for the past 2-3 days. My API services are enabled and I am unsure what the problem could be. Is it on ROBLOX’s end or could it be my code? What’s more probable?
I’m also getting an issue with ProfileService error: “ServerScriptService.Data.ProfileService:1755: [ProfileService]: Profile [Store:“Store Key Here”;Key:“UserId Here”] is already loaded in this session”
Good questions. I’m currently debuging the code as from time to time a profile won’t load (and I’m pretty sure that it was not due to teleport, not releasing, or other things mentioned in the tutorial and troubleshooting pages).
What I’m seeing is that it won’t retry but it might be that I’m not passing the correct parameters to have it retry automaticaly.
I read the source code and from my understanding, it will retry indefinitely if the reason for it not loading the profile is because of DataStore errors. In my game, I just have it so that it displays a loading screen until the profile has been successfully loaded and all the data that needs to replicated to the client is. You can always make it so that if it retries for too long (probably >60 seconds), kick the player if you want.
I’ve never had it not load a profile. I don’t use teleporting or anything like that so that probably helps me.
Depends on your usecase, but I would suggest you make a post in #help-and-feedback:scripting-support, since that’s not necessarily related to ProfileService.
I’m having issues dealing with DDoS attacks. When the server crashes it doesn’t seem to be releasing the profiles and makes it unable to load data in other servers. What should I do?