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

Not Sending Emails with Medium Attachment Size #594

Closed
marcotuna opened this issue May 30, 2018 · 14 comments
Closed

Not Sending Emails with Medium Attachment Size #594

marcotuna opened this issue May 30, 2018 · 14 comments

Comments

@marcotuna
Copy link

marcotuna commented May 30, 2018

Hello, I am trying to send an email with two attachments, one with 400 kb and the other with 8.7 MB.
The server is not sending the email because is throwing an error: "Mysql2::Error: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size us ing innodb_log_file_size."
As far as the error says it's because the size and I can or might fix it by increasing innodb_log_file_size. What if I do not want to log it at all? Is there any way I can disable logging?

ss 2018-05-30 at 12 14 52

@willpower232
Copy link
Collaborator

Can you tell us the current value of innodb_log_file_size?

If you aren't sure where to look, you can run this query SHOW VARIABLES LIKE 'innodb_log_file_size'

@marcotuna
Copy link
Author

marcotuna commented May 30, 2018

Hi, here it is:
MariaDB [(none)]> SHOW VARIABLES LIKE 'innodb_log_file_size'; | innodb_log_file_size | 50331648 |

@willpower232
Copy link
Collaborator

The log file in question is a core part of how MySQL operates so you'll have to at least double the value.

You will need to stop your database server cleanly and update the configuration. It would also be worth stopping Postal during this process.

Have a read of this https://dev.mysql.com/doc/refman/5.6/en/innodb-data-log-reconfiguration.html, be careful and good luck!

@marcotuna
Copy link
Author

Thanks, it worked. I increased from 50 MB to 256 MB. Now I can send the email.
Do you have any recommended hardware configuration for a postal server?

@willpower232
Copy link
Collaborator

Not specifically, the most important component is memory. 8GB is recommended but you may be able to get by with less.

When it comes to performance, configuration is everything. Have a read of #324 and #290

@marcotuna
Copy link
Author

When I try to visualize the email through the Postal Web Panel (Plain Text, HTML and Attachments) it responds with 502 Gateway Error but if I force page refresh it loads correctly. Can't I just disable the email body not to be stored?

@marcotuna
Copy link
Author

As far as I can see it was a RAM issue, however it eats a lot of memory just by navigating through those tabs (Plain Text, HTML and Attachments). I restarted the server and navigated through those tabs and 500 MB of RAM were instantly gone!

@willpower232
Copy link
Collaborator

If you have just restarted the server, the MySQL and Postal processes will take a little while to get going so measuring memory use straight away is difficult to get accurate.

How much memory does your server have?

@marcotuna
Copy link
Author

I upgraded from 2 GB to 4 GB. I only use to send a few emails, is not for bulk email sending. I use it as a relay, I don't need it to store messages.
The thing is, if I navigate to Plain Text, HTML and Attachments from a smaller email I don't see any relevant RAM increase/decrease, however, if I do the same thing on a bigger email (~10 MB) I see those issues.
Restarting the service: "systemctl restart postal" brings back the memory

@willpower232
Copy link
Collaborator

If you're literally only needing a relay, there are other software packages available that will do this task better, e.g. Postfix.

Postals primary purpose is sending emails it receives from applications over an API.

@influenist
Copy link

It seems I'm running into the same issue. A have tons of mails which do not even attempt to been delivered...

Used the install for Ubuntu. Where can I find info on logging? It's a nice project yet misses some logical build. Like log paths, configuration paths etc. Its like a black box which sends en receives mails.

@influenist
Copy link

influenist commented Jul 12, 2018

screen shot 2018-07-12 at 16 07 42

screen shot 2018-07-12 at 16 22 03

@willpower232
Copy link
Collaborator

@influenist please have a look at postal status and the files in /opt/postal/log to see what the problem might be. If you are unable to figure it out, please open a new issue with any relevant information from those places.

@nisanthchunduru
Copy link

nisanthchunduru commented Feb 25, 2020

I hit upon this issue today. I've leaving a comment here in case it helps other Postal users.

I increased the value of innodb_log_file_size to 512 MB in /etc/mysql/my.cnf and restarted MySQL

systemctl restart mysql

so Postal can store and deliver larger emails.

From my web searches, it seems like the only con of increasing the value of innodb_log_file_size is that MySQL / MariaDB will require more time to recover in case of a server crash. This is okay for us.

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

No branches or pull requests

4 participants