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

Unable to save document with large text fields #6465

Closed
tomekwlod opened this issue May 22, 2024 · 4 comments
Closed

Unable to save document with large text fields #6465

tomekwlod opened this issue May 22, 2024 · 4 comments
Assignees

Comments

@tomekwlod
Copy link

tomekwlod commented May 22, 2024

Link to reproduction

No response

Payload Version

tested on 3b32 and 3b24

Node Version

20.9.0

Next.js Version

14.3.0-canary.28

Describe the Bug

I am encountering an issue with Payload CMS where documents containing large text fields are not saving properly. When attempting to save such documents, the request remains pending indefinitely and the document is not saved. This issue persists despite several attempts to resolve it through various configuration changes. The problem is that I cannot even see any error, the request is just pending forever. What's interesting is that if I split the content onto two different fields that won't help either. This tells me that it may be the Content-Lenght issue or something.

Expected Behavior:
The document should save successfully, even with large amounts of text in the fields.

Actual Behavior:
The save request remains pending indefinitely and the document is not saved.

Environment:
MacOS, GCP, Docker, MongoDB

Thanks in advance for any help!

Reproduction Steps

For me it's quite easy to reproduce the issue. It happens on every payload instance I have tried so far. The collection schema may be for example:

const MySchema = {
  slug: 'myschema',
  fields: [
    {
      name: 'largeTextField',
      type: 'textarea',
    },
    // other fields
  ],
};

Now if I populate the largeTextField with a significant amount of text (e.g., 20k of text data) the form will not be saved

Adapters and Plugins

No response

@tomekwlod tomekwlod added the v3 label May 22, 2024
@denolfe denolfe added the status: needs-triage Possible bug which hasn't been reproduced yet label May 26, 2024
@JarrodMFlesch
Copy link
Contributor

@tomekwlod I am unable to reproduce. Could you provide me with some sample text? I added a ton of text and could not recreate.

You are experiencing this on your local machine?

@JarrodMFlesch JarrodMFlesch added the status: cant-reproduce If an issue cannot be reproduced label Jun 12, 2024
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Jun 12, 2024
@tomekwlod
Copy link
Author

tomekwlod commented Jun 13, 2024

Hi @JarrodMFlesch,

Thanks for getting back to me. I can still reproduce the issue, but it only occurs when a large amount of text is added to the document. This happens regardless of whether it's a textarea or a Lexical field. I believe I might be hitting a database limit rather than a payload issue.

We have a specific use case where we need to store a large amount of data in the database (a conference meeting transcript). For now, we've found an alternative solution that works for us.

If you want to reproduce this issue to for example handle the error better, try inputting around 775,000 characters or approximately 115,000 words into one or more fields.

My setup has changed since my initial comment, and it is now as follows:

Payload 3b45
Postgres adapter
Node 20.9.0
Next 15.0.0-rc.0

Thanks!

@JarrodMFlesch
Copy link
Contributor

@tomekwlod I am still unable to reproduce this issue. Tried with 800,000 characters.

I am going to close for now. But if you feel inclined, please link to a reproduction. You can include your config and a text file that contains all the characters that are giving you trouble.

Thanks!

@github-actions github-actions bot removed the status: cant-reproduce If an issue cannot be reproduced label Jun 13, 2024
Copy link
Contributor

github-actions bot commented Sep 7, 2024

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants