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

MailHog works ineffectively with maildir and large volume of messages #298

Open
stanislav-zaprudskiy opened this issue Jun 26, 2020 · 1 comment

Comments

@stanislav-zaprudskiy
Copy link

stanislav-zaprudskiy commented Jun 26, 2020

The problem with MailHog on high volumes of messages data (e.g. 16GB) configured with maildir, is that when someone tries to check the e-mail in the UI, which results into the API call on a client’s behalf:

https://example.com/api/v2/messages?limit=1

(UI does limit=50, but even with limit=1 the issue is imminent)

MailHog seems to try to read all the e-mail messages available to it. The corresponding log message is:

Listing messages in /home/mailhog/mount/maildir

After which it echoes every message it reads from maildir folder into logs. At the same time the client request hangs on waiting, and MailHog process continuously grows in memory consumption. Eventually, either client request is terminated by ELB/proxy (when running behind it) or the process gets into OOM and gets restarted/killed - both of which prevent the client from receiving the response from API.

Giving more memory wouldn’t solve the issue, as it seems to be requiring the amount of memory to be equal to amount of e-mail messages data on disk in order to be able to read everything.

Potentially, configuring MailHog against MongoDB might result into different (more effective) behavior, but that produces additional dependency on MongoDB and maintenance overhead associated with its support.

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

1 participant