upstash / issues

Issue Tracker for Upstash
https://upstash.com
2 stars 0 forks source link

what is the max size of value in a single entry #3

Closed brucemcpherson closed 3 years ago

brucemcpherson commented 3 years ago

I'm using the GraphQL redisSet mutation, and it works well with smaller payloads, but I get an error 400 with bigger payloads. What is the maximum size of value that can be stored (and posted via a graphQL mutation)

noahfschr commented 3 years ago

The limit is 1Mb. What was your object's size?

brucemcpherson commented 3 years ago

About 3mb. Thanks .. I’ll split it up.

update: Actually - the biggest chunk I can set is 400000 - anything above that returns null rather than okay, and doesn't create the item but it doesn't error like > 1mb does.

Congrats on this awesome service.. I've just implemented it on Google Apps Script. - https://ramblings.mcpher.com/apps-script/3-favourite-things/

On Fri, Apr 2, 2021 at 12:38 AM Noah Fischer @.***> wrote:

The limit is 1Mb. What was your object's size?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/upstash/issues/issues/3#issuecomment-812233435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOONBAUQGZ2WSNSQCM7JADTGT7W3ANCNFSM42HFJRWA .

noahfschr commented 3 years ago

Very nice article by the way @brucemcpherson 👌

noahfschr commented 3 years ago

@brucemcpherson Sorry, I thought your database type is standard which has 1Mb limit. For free databases the limit is 400Kb.

I think we need to return a more descriptive error. I will create an issue regarding this.

brucemcpherson commented 3 years ago

Ok - makes sense now. Thank you.

On Fri, 2 Apr 2021 at 17:43, Noah Fischer @.***> wrote:

@brucemcpherson https://github.com/brucemcpherson Sorry, I thought your database type is standard which has 1Mb limit. For free databases the limit is 400Kb.

I think we need to return a more descriptive error. I will create an issue regarding this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/upstash/issues/issues/3#issuecomment-812609333, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOONBGRP5QENIB2ALVKRBLTGXXZXANCNFSM42HFJRWA .

noahfschr commented 3 years ago

created #4, closing this

brucemcpherson commented 3 years ago

@noahfschr I notice that redisMSet seems to fail too if the total of each payload is large, even though the individual values are all less then 400k. I'd assumed that the limit of 400k applied to each key/value pair - but it looks like it applies to the entire payload. Is that right, and would an MSet on the paid plan also have the 1mb limit on the sum of the keyvaluepairs rather than each individual value?

noahfschr commented 3 years ago

@brucemcpherson Let me explain the background of this limit. The cloud provider (AWS) charges us for the data transferred. Our pricing is per request. If we do not put limit on the request size, then it can be a financial risk as the data transfer cost can be very high.

The limit is per request size. The MSET command is serialized as a single request. Its total size should be less than the limit which is 400Kb for Free databases. So if you split your payload to multiple values, you need to send with seperate commands (multiple SET commands).

brucemcpherson commented 3 years ago

Yep - got it. Makes perfect sense. Thanks for the background info.

On Sun, 4 Apr 2021 at 05:42, Noah Fischer @.***> wrote:

@brucemcpherson https://github.com/brucemcpherson Let me explain the background of this limit. The cloud provider (AWS) charges us for the data transferred. Our pricing is per request. If we do not put limit on the request size, then it can be a financial risk as the data transfer cost can be very high.

The limit is per request size. The MSET command is serialized as a single request. Its total size should be less than the limit which is 400Kb for Free databases. So if you split your payload to multiple values, you need to send with seperate commands (multiple SET commands).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/upstash/issues/issues/3#issuecomment-812965614, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOONBHY5R6UTKM3SSRHS7DTG7NYTANCNFSM42HFJRWA .