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

Unreachable MariaDB instance indefinitely fills the disk #3162

Open
1 task done
krislamo opened this issue Aug 7, 2023 · 1 comment
Open
1 task done

Unreachable MariaDB instance indefinitely fills the disk #3162

krislamo opened this issue Aug 7, 2023 · 1 comment
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment

Comments

@krislamo
Copy link

krislamo commented Aug 7, 2023

Steps To Reproduce

I set up a unified Bitwarden instance on Docker, using MariaDB on the host for testing purposes. However, due to other priorities, I could not create the necessary firewall rule in time for database access. The setup was left in this state for a significant period. Upon returning to the system, I found the Docker volume was nearly filled, which appears to be caused by frequent MySQL client dumps to the /app/Admin directory.

The dumps were named following a core.xxxxx pattern (where xxxxx is a number, e.g., core.27547), with each dump file approximately 74-85MB in size. These dumps had accumulated over time, reaching a size of 76GB within 7 hours. Although I recognize that a blocked database is not a supported configuration, I believe this behavior is unexpected and undesirable - it poses a significant risk as it could lead to unnecessary storage usage in a short time, even if the database were to fail for reasons other than lack of a firewall rule in a test environment.

Expected Result

I suppose it should error a few times, produce a few cores, then give up without generating continuous dumps.

Actual Result

The /app/Admin directory is continuously filled with core.xxxx files if the MySQL instance is not reachable.

Screenshots or Videos

No response

Additional Context

Here is the compose file used, minus sensitive bits:

version: '3.5'

networks:
  traefik:
    external: true

services:
  bitwarden:
    image: bitwarden/self-host:beta
    restart: always
    volumes:
      - bitwarden:/etc/bitwarden
    networks:
      - traefik
    extra_hosts:
      - "host.docker.internal:172.17.0.1"
    labels:
      - "traefik.http.routers.bitwarden.rule=Host(`bitwarden.example.org`)"
      - "traefik.http.routers.bitwarden.entrypoints=websecure"
      - "traefik.http.routers.bitwarden.tls=true"
      - "traefik.http.services.bitwarden.loadbalancer.server.port=8080"
      - "traefik.docker.network=traefik"
    environment:
      BW_DOMAIN: bitwarden.example.org
      BW_DB_PROVIDER: mariadb
      BW_DB_SERVER: host.docker.internal
      BW_DB_DATABASE: bitwarden
      BW_DB_USERNAME: bitwarden
      BW_DB_PASSWORD: notmypassword
      BW_INSTALLATION_ID: 001
      BW_INSTALLATION_KEY: notmykey

volumes:
  bitwarden

Githash Version

88a61fe-dirty

Environment Details

No response

Database Image

Using MariaDB 10.5.x on the host but access is blocked.

Issue-Link

#2480

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@krislamo krislamo added bug bw-unified-deploy An Issue related to Bitwarden unified deployment labels Aug 7, 2023
@sammbw
Copy link

sammbw commented Aug 8, 2023

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment
Projects
None yet
Development

No branches or pull requests

2 participants