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

Mysql2::Error: Data too long for column 'output' at row 1 #2831

Closed
fulemul opened this issue Mar 1, 2024 · 1 comment · Fixed by #2834
Closed

Mysql2::Error: Data too long for column 'output' at row 1 #2831

fulemul opened this issue Mar 1, 2024 · 1 comment · Fixed by #2834

Comments

@fulemul
Copy link

fulemul commented Mar 1, 2024

Describe the bug

Postal version 2.3.1 is intermittently failing to send emails with the error: Mysql2::Error: Data too long for column 'output' at row 1. This issue appears to be similar to previously reported incidents from 2022 and before; however, solutions from those incidents have not resolved the problem.

This is happening on a completely new installation of Postal, and all steps were followed according to the official documentation.

To Reproduce

Steps to reproduce the behavior are not fully determined as the issue is intermittent. It usually occurs during normal send operations.

  1. Send an email with Postal.
  2. Occasionally, the error Mysql2::Error: Data too long for column 'output' at row 1 is observed.
  3. The message fails to send and is queued for a retry.

Expected behavior

Emails should be sent without encountering a 'Data too long' error for the 'output' column.

Environment details

  • OS: Ubuntu 22
  • Postal version: 2.3.1
  • Database: mariadb
  • Installation type: docker

Additional information/context

The 'output' column in the relevant database table may need to be verified for adequate length. It is suggested that the issue might pertain to larger-than-expected data being written to the 'output' column.

Support Ref: J-RECCKY0PSB

Any assistance or guidance to resolve this would be greatly appreciated.

@adamcooke
Copy link
Contributor

adamcooke commented Mar 1, 2024

This happens when the data returned from the SMTP or HTTP Endpoint is longer than 255 characters. Most of the time this isn't an issue because these servers are not all that talkative but, regardless, it shouldn't fail.

I've pushed a fix for this which I'll release in 2.3.2 a bit later.

In the meantime, you can either disable strict mode on your database or make those columns bigger to accommodate the larger output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants