[GH-ISSUE #271] Docker up failure? "disk I/O error (5386)" mailpit exited with code 1 #179

Closed
opened 2026-03-15 13:03:03 +03:00 by kerem · 8 comments
Owner

Originally created by @epicwhale on GitHub (Mar 30, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/271

Following the docker compose example: https://mailpit.axllent.org/docs/install/docker/

    mailpit:
        image: axllent/mailpit:latest
        container_name: mailpit
        volumes:
            - ./data:/data
        ports:
            - 8025:8025
            - 1025:1025
        environment:
            MP_MAX_MESSAGES: 5000
            MP_DATA_FILE: /data/mailpit.db
            MP_SMTP_AUTH_ACCEPT_ANY: 1
            MP_SMTP_AUTH_ALLOW_INSECURE: 1

When I up it:

docker compose up mailpit
[+] Running 1/0
 ✔ Container mailpit  Created                                                                                                                                                   0.0s 
Attaching to mailpit
mailpit  | time="2024/03/30 09:15:35" level=error msg="disk I/O error (5386)"
mailpit exited with code 1

Any pointers to resolving this?

Originally created by @epicwhale on GitHub (Mar 30, 2024). Original GitHub issue: https://github.com/axllent/mailpit/issues/271 Following the docker compose example: https://mailpit.axllent.org/docs/install/docker/ ``` mailpit: image: axllent/mailpit:latest container_name: mailpit volumes: - ./data:/data ports: - 8025:8025 - 1025:1025 environment: MP_MAX_MESSAGES: 5000 MP_DATA_FILE: /data/mailpit.db MP_SMTP_AUTH_ACCEPT_ANY: 1 MP_SMTP_AUTH_ALLOW_INSECURE: 1 ``` When I up it: ``` docker compose up mailpit [+] Running 1/0 ✔ Container mailpit Created 0.0s Attaching to mailpit mailpit | time="2024/03/30 09:15:35" level=error msg="disk I/O error (5386)" mailpit exited with code 1 ``` Any pointers to resolving this?
kerem closed this issue 2026-03-15 13:03:09 +03:00
Author
Owner

@epicwhale commented on GitHub (Mar 30, 2024):

Enabling verbose, I get a:

mailpit-1  | time="2024/03/30 09:44:10" level=debug msg="[db] opening database /data/mailpit.db"
mailpit-1  | time="2024/03/30 09:44:10" level=error msg="disk I/O error (5386)"

But I can see it has created these successfully:
image

<!-- gh-comment-id:2027994435 --> @epicwhale commented on GitHub (Mar 30, 2024): Enabling verbose, I get a: ``` mailpit-1 | time="2024/03/30 09:44:10" level=debug msg="[db] opening database /data/mailpit.db" mailpit-1 | time="2024/03/30 09:44:10" level=error msg="disk I/O error (5386)" ``` But I can see it has created these successfully: <img width="209" alt="image" src="https://github.com/axllent/mailpit/assets/670655/30cafcef-7b41-488f-9540-7e3805c65666">
Author
Owner

@axllent commented on GitHub (Mar 30, 2024):

Hi. Is your ./data directory by any chance a remote-mounted filesystem? What host OS are you using?

<!-- gh-comment-id:2027997248 --> @axllent commented on GitHub (Mar 30, 2024): Hi. Is your `./data` directory by any chance a remote-mounted filesystem? What host OS are you using?
Author
Owner

@epicwhale commented on GitHub (Mar 30, 2024):

It's a local file system. Using podman on MacOS if that helps? @axllent

<!-- gh-comment-id:2028017421 --> @epicwhale commented on GitHub (Mar 30, 2024): It's a local file system. Using podman on MacOS if that helps? @axllent
Author
Owner

@axllent commented on GitHub (Mar 30, 2024):

Yes and no (unfortunately). This appears to be a docker (or in your case podman) issue unrelated to Mailpit from what I can tell (searching Google). There is something going wrong with the mount to your local filesystem (permissions, full file system, storage limits, ownership etc), but I can't tell what. My suggestion would be to Google the error "docker disk I/O error" and you will find plenty of issues and potential causes for you to look into and hopefully find the cause.

Sorry I can't help more. Mailpit's docker images have been downloaded close to 3.5 million times and this is the first report I've seen of this nature, so everything indicates that it is a local issue on your end.

<!-- gh-comment-id:2028025562 --> @axllent commented on GitHub (Mar 30, 2024): Yes and no (unfortunately). This appears to be a docker (or in your case podman) issue unrelated to Mailpit from what I can tell (searching Google). There is something going wrong with the mount to your local filesystem (permissions, full file system, storage limits, ownership etc), but I can't tell what. My suggestion would be to Google the error "docker disk I/O error" and you will find plenty of issues and potential causes for you to look into and hopefully find the cause. Sorry I can't help more. Mailpit's docker images have been downloaded close to 3.5 million times and this is the first report I've seen of this nature, so everything indicates that it is a local issue on your end.
Author
Owner

@epicwhale commented on GitHub (Mar 30, 2024):

@axllent thanks for the tips, i'll dig into it further! for now disabling the MP_DATA_FILE helps during development. I have a feeling this has something to do with wal/shm enabled for the sqlite db, and how podman filesystem on mac virtual machines work. Is there a way to disable the wal/shm for the MP_DATA_FILE?

<!-- gh-comment-id:2028026412 --> @epicwhale commented on GitHub (Mar 30, 2024): @axllent thanks for the tips, i'll dig into it further! for now disabling the `MP_DATA_FILE` helps during development. I have a feeling this has something to do with wal/shm enabled for the sqlite db, and how podman filesystem on mac virtual machines work. Is there a way to disable the wal/shm for the MP_DATA_FILE?
Author
Owner

@axllent commented on GitHub (Mar 30, 2024):

Not currently, no. This option was added a while back for performance reasons, and shouldn't cause issues, but you could be right if the filesystem is treated as a remote filesystem. I know it works on Mac with volumes though, so I assume it should work with local mounts as well.

<!-- gh-comment-id:2028030767 --> @axllent commented on GitHub (Mar 30, 2024): Not currently, no. This option was added a while back for performance reasons, and shouldn't cause issues, but you could be right if the filesystem is treated as a remote filesystem. I know it works on Mac with volumes though, so I assume it should work with local mounts as well.
Author
Owner

@epicwhale commented on GitHub (Mar 30, 2024):

Switching to volumes did the job! thanks for the prompt help here, really appreciate it! :)

ps - great work with mailpit!

<!-- gh-comment-id:2028051350 --> @epicwhale commented on GitHub (Mar 30, 2024): Switching to volumes did the job! thanks for the prompt help here, really appreciate it! :) ps - great work with mailpit!
Author
Owner

@axllent commented on GitHub (Mar 30, 2024):

Thank you. Given that the issues are (I'm almost 100% certain) related to your local filesystem mount, I'll close this issue. If you do come across the actual reason for this then please feel free to re-open it.

<!-- gh-comment-id:2028456468 --> @axllent commented on GitHub (Mar 30, 2024): Thank you. Given that the issues are (I'm almost 100% certain) related to your local filesystem mount, I'll close this issue. If you do come across the actual reason for this then please feel free to re-open it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#179
No description provided.