Skip to content

Commit 705515b

Browse files
redis storage update and media upload faq (#153)
## 💸 TL;DR <!-- What's the three sentence summary of purpose of the PR --> Removed the explicit Redis 500 MB storage limit from the docs and replaced it with softer guidance that the team will reach out if an app hits storage limits. Added/updated media upload guidance to say uploads have both: 20 MB max file size 30-second timeout files around 10 MB+ may fail on slow networks Also added a FAQ for the “why does 10 MB fail if docs say 20 MB?” case, and made the Forms image notes more direct and consistent.
1 parent 0ef6a6a commit 705515b

8 files changed

Lines changed: 38 additions & 16 deletions

File tree

docs/capabilities/client/forms.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,10 @@ const imageField = {
459459

460460
#### Notes
461461

462-
- The formats supported are PNG, JPEG, WEBP, and GIF.
463-
- The maximum file size allowed is 20 MB.
464-
- When uploading a WEBP image, it will be converted to JPEG. As such, the Reddit URL returned points to a JPEG image.
462+
- Supported image formats: PNG, JPEG, WEBP, and GIF.
463+
- Maximum file size: 20 MB.
464+
- Upload timeout: 30 seconds. Files close to 10 MB or larger can fail on slower networks.
465+
- WEBP uploads are converted to JPEG. The returned Reddit URL points to a JPEG image.
465466

466467
### Group
467468

docs/capabilities/server/media-uploads.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,5 @@ app.post('/api/upload-screenshot', async (c) => {
203203

204204
- Supported image upload formats: PNG, JPEG, WEBP, and GIF.
205205
- Maximum upload size: 20 MB.
206+
- Upload timeout: 30 seconds. Files close to 10 MB or larger can fail on slower networks.
206207
- WEBP uploads may be converted to JPEG in the returned Reddit URL.

docs/capabilities/server/redis.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ For command-specific behavior and limits, see the [supported Redis commands](htt
6464

6565
## Storage values
6666

67-
Redis is best for small, frequently accessed app states. Each Redis installation has a 500 MB storage limit and a 5 MB request size limit.
67+
Redis is best for small, frequently accessed app states. Each Redis installation has a 5 MB request size limit. On occasion, apps will run into storage limits. Our team will reach out to you if this occurs and work with you to optimize your app.
6868

6969
If your app stores large JSON objects, long text values, or historical records that still belong in Redis, use`redisCompressed`.
7070

@@ -106,9 +106,9 @@ Transactions are limited to 30 concurrent transaction blocks per installation, a
106106

107107
For more details, see [Transactions](https://github.com/reddit/devvit-docs/blob/69f35f2254617e4a1347686235a560a78d94535b/versioned_docs/version-0.12/capabilities/server/redis.mdx#transactions).
108108

109-
## Quota failures
109+
## Storage limit failures
110110

111-
When an installation reaches the Redis storage limit, write operations can fail. Treat Redis writes as operations that may need a user-facing fallback.
111+
If an installation runs into storage limits, write operations can fail. Treat Redis writes as operations that may need a user-facing fallback.
112112

113113
A good failure path should:
114114

@@ -168,7 +168,6 @@ Design around these limits early so your app stays responsive as more people use
168168
| :---- | :---- | :---- |
169169
| Command throughput | 40,000 commands per second per installation | Avoid one Redis call per item in hot loops. Use batch commands such as `mGet`, `mSet`, and `hash` writes where they fit. |
170170
| Pipelining | Not supported | Reduce round trips by grouping related fields under hashes or compact JSON values. |
171-
| Storage | 500 MB per installation | Use `redisCompressed` for large values, expire temporary data, and cap unbounded histories. |
172171
| Request size | 5 MB | Store large datasets as multiple records and process them in batches. |
173172
| Transactions | 20 concurrent transaction blocks; 5-second execution timeout | Keep transaction logic small and release transactions with `exec`, `discard`, or `unwatch`. |
174173

docs/guides/faq.mdx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,16 @@ See [Forms](../capabilities/client/forms.mdx) and [Media uploads](../capabilitie
294294

295295
</details>
296296

297+
<span id="why-do-image-uploads-over-10-mb-fail-if-the-limit-is-20-mb"></span>
298+
<details>
299+
<summary>Why do image uploads over 10 MB fail if the limit is 20 MB?</summary>
300+
301+
Media uploads have both a 20 MB maximum upload size and a 30-second timeout. Files close to 10 MB or larger can still fail on slower networks if the upload does not finish before the timeout.
302+
303+
Try compressing the image, reducing dimensions, or retrying from a faster connection.
304+
305+
</details>
306+
297307
<span id="what-image-urls-can-i-use-in-a-devvit-app"></span>
298308
<details>
299309
<summary>What image URLs can I use in a Devvit app?</summary>
@@ -424,7 +434,7 @@ You can also edit the display name, about description, and mature flag (18+) fie
424434

425435
There's no single limits page today, but these are the most commonly referenced numbers in the docs:
426436

427-
- [Redis](../capabilities/server/redis.mdx): 500 MB max storage per installation, 5 MB max request size, and 40,000 max commands per second.
437+
- [Redis](../capabilities/server/redis.mdx): 5 MB max request size and 40,000 max commands per second.
428438
- [Devvit Web](../capabilities/devvit-web/devvit_web_overview.mdx): 30 second max request time, 4 MB max payload size, and 10 MB max response size.
429439
- [Post data](../capabilities/server/post-data.mdx): 2 KB per post.
430440
- [Settings and secrets](../capabilities/server/settings-and-secrets.mdx): 2 KB per setting value.

versioned_docs/version-0.13/capabilities/client/forms.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,10 @@ const imageField = {
459459

460460
#### Notes
461461

462-
- The formats supported are PNG, JPEG, WEBP, and GIF.
463-
- The maximum file size allowed is 20 MB.
464-
- When uploading a WEBP image, it will be converted to JPEG. As such, the Reddit URL returned points to a JPEG image.
462+
- Supported image formats: PNG, JPEG, WEBP, and GIF.
463+
- Maximum file size: 20 MB.
464+
- Upload timeout: 30 seconds. Files close to 10 MB or larger can fail on slower networks.
465+
- WEBP uploads are converted to JPEG. The returned Reddit URL points to a JPEG image.
465466

466467
### Group
467468

versioned_docs/version-0.13/capabilities/server/media-uploads.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,5 @@ app.post('/api/upload-screenshot', async (c) => {
203203

204204
- Supported image upload formats: PNG, JPEG, WEBP, and GIF.
205205
- Maximum upload size: 20 MB.
206+
- Upload timeout: 30 seconds. Files close to 10 MB or larger can fail on slower networks.
206207
- WEBP uploads may be converted to JPEG in the returned Reddit URL.

versioned_docs/version-0.13/capabilities/server/redis.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ For command-specific behavior and limits, see the [supported Redis commands](htt
6464

6565
## Storage values
6666

67-
Redis is best for small, frequently accessed app states. Each Redis installation has a 500 MB storage limit and a 5 MB request size limit.
67+
Redis is best for small, frequently accessed app states. Each Redis installation has a 5 MB request size limit. On occasion, apps will run into storage limits. Our team will reach out to you if this occurs and work with you to optimize your app.
6868

6969
If your app stores large JSON objects, long text values, or historical records that still belong in Redis, use`redisCompressed`.
7070

@@ -106,9 +106,9 @@ Transactions are limited to 30 concurrent transaction blocks per installation, a
106106

107107
For more details, see [Transactions](https://github.com/reddit/devvit-docs/blob/69f35f2254617e4a1347686235a560a78d94535b/versioned_docs/version-0.12/capabilities/server/redis.mdx#transactions).
108108

109-
## Quota failures
109+
## Storage limit failures
110110

111-
When an installation reaches the Redis storage limit, write operations can fail. Treat Redis writes as operations that may need a user-facing fallback.
111+
If an installation runs into storage limits, write operations can fail. Treat Redis writes as operations that may need a user-facing fallback.
112112

113113
A good failure path should:
114114

@@ -168,7 +168,6 @@ Design around these limits early so your app stays responsive as more people use
168168
| :---- | :---- | :---- |
169169
| Command throughput | 40,000 commands per second per installation | Avoid one Redis call per item in hot loops. Use batch commands such as `mGet`, `mSet`, and `hash` writes where they fit. |
170170
| Pipelining | Not supported | Reduce round trips by grouping related fields under hashes or compact JSON values. |
171-
| Storage | 500 MB per installation | Use `redisCompressed` for large values, expire temporary data, and cap unbounded histories. |
172171
| Request size | 5 MB | Store large datasets as multiple records and process them in batches. |
173172
| Transactions | 20 concurrent transaction blocks; 5-second execution timeout | Keep transaction logic small and release transactions with `exec`, `discard`, or `unwatch`. |
174173

versioned_docs/version-0.13/guides/faq.mdx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,16 @@ See [Forms](../capabilities/client/forms.mdx) and [Media uploads](../capabilitie
294294

295295
</details>
296296

297+
<span id="why-do-image-uploads-over-10-mb-fail-if-the-limit-is-20-mb"></span>
298+
<details>
299+
<summary>Why do image uploads over 10 MB fail if the limit is 20 MB?</summary>
300+
301+
Media uploads have both a 20 MB maximum upload size and a 30-second timeout. Files close to 10 MB or larger can still fail on slower networks if the upload does not finish before the timeout.
302+
303+
Try compressing the image, reducing dimensions, or retrying from a faster connection.
304+
305+
</details>
306+
297307
<span id="what-image-urls-can-i-use-in-a-devvit-app"></span>
298308
<details>
299309
<summary>What image URLs can I use in a Devvit app?</summary>
@@ -424,7 +434,7 @@ You can also edit the display name, about description, and mature flag (18+) fie
424434

425435
There's no single limits page today, but these are the most commonly referenced numbers in the docs:
426436

427-
- [Redis](../capabilities/server/redis.mdx): 500 MB max storage per installation, 5 MB max request size, and 40,000 max commands per second.
437+
- [Redis](../capabilities/server/redis.mdx): 5 MB max request size and 40,000 max commands per second.
428438
- [Devvit Web](../capabilities/devvit-web/devvit_web_overview.mdx): 30 second max request time, 4 MB max payload size, and 10 MB max response size.
429439
- [Post data](../capabilities/server/post-data.mdx): 2 KB per post.
430440
- [Settings and secrets](../capabilities/server/settings-and-secrets.mdx): 2 KB per setting value.

0 commit comments

Comments
 (0)