Hello, I am using ProfileService and I have servers with roughly 60 players in each. Whenever I check the Server Console, it floods with these errors. I’ve tried to fix it but then whenever I do, people’s data just do not seem to save, but when it’s like this, it does save. But is there any way for it to still save but not spam the console as much?
Needs way more information such as implementation details if you want to get any help. The only thing that can be offered is surface-level information at a glance here and that requires assuming implementation details which you haven’t provided.
Dropped requests are representative of you running out of budget, and based on how much this message is flooding the console it looks like you’re calling a member of ProfileService that performs a DataStore request in a pipeline that runs frequently (e.g. either RunService, Touched event, etc).
This is something you’re going to need to dive into yourself or supply extensive details if you want help on the forum.
How so? It’s just the regular ProfileService that anyone can access themselves as it’s all over the internet. There is no need for me to provide anymore information about this. My idea is just that the AutoSave might be too much, but for 60 players, it shouldn’t be too bad?
Yes, you actually do need to supply way more information than “it doesn’t work”, that’s not helpful at all and leaves responders to guess and shoot in the dark about how you’re using ProfileService and how to identify how you may be using it wrong.
I use ProfileService in experiences as well so I know for a fact that this is not a common situation and has to do with the way you implemented it, but if you aren’t going to share implementation details, then it’s difficult to offer you help without wasting time trying to guess how you’re using it.
Well I am using PSManager to manage it and grab data, but all it does is just loads the player for me and saves the data when leaving and also makes it easier to get profile data, nothing special.
But I believe this is just because of ProfileServices AutoSaveEnabled, how many players do you have in your servers at a time? This only happens when there are about 60+ players.
if SETTINGS.AutoSaveEnabled then
RunService.Heartbeat:Connect(function()
-- 1) Auto saving: --
local auto_save_list_length = #AutoSaveList
if auto_save_list_length > 0 then
local auto_save_index_speed = SETTINGS.AutoSaveProfiles / auto_save_list_length
local os_clock = os.clock()
while os_clock - LastAutoSave > auto_save_index_speed do
LastAutoSave = LastAutoSave + auto_save_index_speed
local profile = AutoSaveList[AutoSaveIndex]
if os_clock - profile._load_timestamp < SETTINGS.AutoSaveProfiles then
-- This profile is freshly loaded - auto-saving immediately after loading will cause a warning in the log:
profile = nil
for i = 1, auto_save_list_length - 1 do
-- Move auto save index to the right:
AutoSaveIndex = AutoSaveIndex + 1
if AutoSaveIndex > auto_save_list_length then
AutoSaveIndex = 1
end
profile = AutoSaveList[AutoSaveIndex]
if os_clock - profile._load_timestamp >= SETTINGS.AutoSaveProfiles then
break
else
profile = nil
end
end
end
-- Move auto save index to the right:
AutoSaveIndex = AutoSaveIndex + 1
if AutoSaveIndex > auto_save_list_length then
AutoSaveIndex = 1
end
-- Perform save call:
--print("[ProfileService]: Auto updating profile - profile_store_name = \"" .. profile._profile_store._profile_store_name .. "\"; profile_key = \"" .. profile._profile_key .. "\"")
if profile ~= nil then
coroutine.wrap(SaveProfileAsync)(profile) -- Auto save profile in new thread
task.wait(0.1)
end
end
end
-- 2) Issue queue: --
-- Critical state handling:
if ProfileService.CriticalState == false then
if #IssueQueue >= SETTINGS.IssueCountForCriticalState then
ProfileService.CriticalState = true
ProfileService.CriticalStateSignal:Fire(true)
CriticalStateStart = os.clock()
warn("[ProfileService]: Entered critical state")
end
else
if #IssueQueue >= SETTINGS.IssueCountForCriticalState then
CriticalStateStart = os.clock()
elseif os.clock() - CriticalStateStart > SETTINGS.CriticalStateLast then
ProfileService.CriticalState = false
ProfileService.CriticalStateSignal:Fire(false)
warn("[ProfileService]: Critical state ended")
end
end
-- Issue queue:
while true do
local issue_time = IssueQueue[1]
if issue_time == nil then
break
elseif os.clock() - issue_time > SETTINGS.IssueLast then
table.remove(IssueQueue, 1)
else
break
end
end
end)
end