You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With collections with select fields that have large enums
Using Postgres
Then
The Node instance Payload is runing on will eventually crash due to an OOM.
Where
The schema comparison step inside packages/drizzle/src/utilities/pushDevSchema.ts:26
Why
The method of comparing the old and new schemas uses node:assert.deepStrictEqual which has poor performance, especially with larger objects. Over time, Payload projects using Postgres with large/complex schemas will become slower, eventually running into physical memory limits.
Uh oh!
There was an error while loading. Please reload this page.
Describe the Bug
Fix
PR is available and open here
When
pnpm dev
Then
The Node instance Payload is runing on will eventually crash due to an OOM.
Where
The schema comparison step inside
packages/drizzle/src/utilities/pushDevSchema.ts:26
Why
The method of comparing the old and new schemas uses
node:assert.deepStrictEqual
which has poor performance, especially with larger objects. Over time, Payload projects using Postgres with large/complex schemas will become slower, eventually running into physical memory limits.Resources
Previously posted discussion
Link to the code that reproduces this issue
https://github.com/jeepman32/schema-pulling-oom
Reproduction Steps
These steps aren't required for the reproduction repo, but are useful if trying to create a fresh reproduction.
pnpm/npm/yarn run dev
Which area(s) are affected? (Select all that apply)
db-postgres, area: core
Environment Info
The text was updated successfully, but these errors were encountered: