Closed dongfanger2018 closed 9 months ago
You should not turn off MMKV's log. And you should provide MMKV's log when crash happens.
You should not turn off MMKV's log. And you should provide MMKV's log when crash happens.
which MMKVLogLevel? info or error?
Use the default setting.
Use the default setting.
Added, but it will take time to collect the user's mmkv log and crash report.
new crash user, the stack is same as old. mmkv log has been uploaded, but log at crash moment has been flushed, don't know the following mmkv log can help?
the issue will be updated as soon as I get new log
According to your log, the MMKV file mmkv.user.16523274 is corrupted. You might consider delete it for this user.
A later log with successful loading on the file shows that the file is considerable LARGE. It's over 1GB. No wonder it's constantly fail to load. Something must be wrong with your logic. You should check on what cause it expand this large. Maybe it's too much keys, or maybe some very large value is inside?
2024-01-02 01:57:52.513 [INFO] [KVManager:258]: [KV] info file:MMKV_IO.cpp|line:78|funcname:loadFromFile|message:Optional("loading [mmkv.user.16523274] with 562480594 actual size, file size 1073741824, InterProcess 0, meta info version:4") 2024-01-02 01:57:53.051 [INFO] [KVManager:258]: [KV] info file:MMKV_IO.cpp|line:127|funcname:loadFromFile|message:Optional("loaded [mmkv.user.16523274] with 9088 key-values")
Closed due to inactive.
Is there an approach to limit the mmkv file size and reduce the count of keys? otherwise developers have to delete key-value items and call trim method in business logic layer
Yep, you have to do it by yourself. @dongfanger2018
can you give a suggestion on max number count of keys and max filesize of store file
The language of MMKV
Swift
The version of MMKV
v1.3.2
The platform of MMKV
iOS Host App & UNNotificationServiceExtension
The installation of MMKV
Cocoapods
What's the issue?
crash
What's the log of MMKV when that happened?
didn't open MMKV log, has crash log only
App use 2 MMKV instance
shared one, across user domain, use multiProcess mode
user one, for every user
crash when using the second(user one)
this is crash log from apple 2023-12-1519-23-05.0669+0700-760963e560ccc42e362536aff66627379c637e62.crash.zip