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
Bug: Cannot insert/create a data that contains a large vector size #4007
Comments
This question can probably be better answered by @emmanuel-keller , but from the network side we may configure the limit of network messages to allow this in the future. |
The Rust SDK has a hard currently a hard limit related to the maximum size of a message.
Workaround 1 - Use
|
Thanks for your response! Re. (1) Ahh I see. Yes I do need to store in u32 since this array is used to store token (LLM context), a llama3 tokenizer vocab size can go up to 128256 which needs u32 to store. Re. (2) I tried the http connection and it gives me the same thing. Re. (3) working around 3, could you give more context on how I should use array::push? Re. follow up, can I configure the env var right now or in the future version? |
Also regarding this line, it the max size looks like 64 MB, but u32 * array size (2_000_000) should be only 8 MB if my math is correct. Just wondering if this is expected? |
Here is how you can do that: CREATE foo:1 SET bar = [1, 2, 3];
[[{ bar: [1, 2, 3], id: foo:1 }]]
UPDATE foo:1 SET bar += [4, 5, 6];
[[{ bar: [1, 2, 3, 4, 5, 6], id: foo:1 }]]
SELECT * FROM foo;
[[{ bar: [1, 2, 3, 4, 5, 6], id: foo:1 }]] Server side, you can already change the configuration using the environment variable (since 1.4.x).
That's a good point. It all depend on the serialisation. Which version of the server and the SDK are you using? |
I am using
|
The current binary serialization is not optimal for large vectors. Due to the parsing process, the That said, that's still under the 64MB limit. So, we are still currently investigating this issue. |
Thanks for your active and quick response! Really appreciate it. I have tried your work around and make it work for my case. I am also curious about the issue so keep me update if you found it later. Again thanks. really like this project and keep the good work! |
Describe the bug
Description
In surrealdb, I am trying to insert a record which one field contains an array size 2_000_000 elements and I found out it won't let me do this and return: Api(Ws("IO error: Broken pipe (os error 32)")) or Payload too large if using http connection. How should I increase the maximum payload limitation in this case? Is it designed to be capped for data insertion query? I've provided a minimum reproducable example below which just insert an array of size 2_000_000. Hope someone can take a look and give some suggestion. Thanks in advance.
Steps to reproduce
Here's a minimum reproducable example:
Expected behaviour
Successfully insert the data
SurrealDB version
1.4.2 for linux on x86_64
Contact Details
No response
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: