Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The database file seems to have a limit of 1G, thens throws an exception when trying to put more objects #35

Open
lymslive opened this issue Aug 23, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@lymslive
Copy link

Describe the bug
I just test transfer large data from another database to objectbox, where each record has about 3000 fields.
When I have put about 40000 records into objectbox, and the file objectbox/data.mdb reach about 1GB size, then it refuse to put any more new object.

Throw obx::DbException with wath() message: Could not put.
And print Storage error(code -30792)

Basic info (please complete the following information):

  • ObjectBox version: latest version 0.18.0
  • C++11, gcc 4.8.5
  • OS: centos 7.9
@lymslive lymslive added the bug Something isn't working label Aug 23, 2023
@greenrobot greenrobot added documentation Improvements or additions to documentation and removed bug Something isn't working labels Aug 23, 2023
@greenrobot
Copy link
Member

The 1 GB is a default, which can be changed via options. In C++ there's an Option class for that and in C there are obx_opt_*() functions. These options have to be prepared before opening the store.

To increase the DB limit, use obx::Options::maxDbSizeInKb(uint64_t sizeInKb) in C++. For C, it's obx_opt_max_db_size_in_kb(OBX_store_options *opt, uint64_t size_in_kb).

@greenrobot greenrobot changed the title The database file seems has limit of 1G, then trow exception when try put more object The database file seems to have a limit of 1G, thens throws an exception when trying to put more objects Aug 23, 2023
@paulocoutinhox
Copy link

1 - There is an option for auto limit or no limit?
2 - When you increase the DB size, the existing databases break?

@greenrobot
Copy link
Member

  1. Set the limit to a value that you are sure you will never hit
  2. The max DB size can be changed without affecting the database

(I'm still leaving this issue open to improve our docs page with the information.)

@paulocoutinhox
Copy link

@greenrobot can you help me here too #25 ? thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants