8000 Laravel Sail continues logging database errors after containers are stopped · Issue #749 · laravel/sail · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ 8000
Skip to content
Laravel Sail continues logging database errors after containers are stopped #749
Open
@pejeio

Description

@pejeio

Sail Version

1.37.0

Laravel Version

11.29.0

PHP Version

8.3.12

Operating System

macOS

OS Version

15.1 (Apple M1 Pro)

Description

After stopping all Sail containers with sail down and even fully quitting Docker Desktop, the Laravel log file (storage/logs/laravel.log) continues to receive error entries. This behavior is unexpected since no Docker containers should be actively running or producing logs at this point.

I initially identified this issue while working with Laravel Telescope (bug report filed here), where Telescope kept logging connection errors every minute, indicating SQLSTATE[08006] [7] could not translate host name "pgsql".

Additional Context

I’ve confirmed that:

  • No other PHP, artisan, or PostgreSQL processes are running on the host machine.
  • Manually clearing Laravel caches and stopping any local services does not prevent the logs from receiving new entries.

This issue may be related to how Laravel Sail (or Docker Desktop) handles host name resolution (host.docker.internal vs. pgsql) and could be a source of persistent network activity even after containers are stopped.

Let me know if any further information is needed to investigate this behavior.

Steps To Reproduce

  1. Set up a new Laravel project using Laravel Sail
  2. Follow the Local Only Installation section in the Telescope documentation
  3. Monitor your storage/logs/laravel.log file.
  4. You will see a lot of SQLSTATE errors.
  5. Stop Sail using sail down.
  6. Quit Docker Desktop entirely.
  7. Observe that laravel.log continues to log errors
[2024-11-07 22:27:19] local.ERROR: SQLSTATE[08006] [7] connection to server at "pgsql" (127.0.0.1), port 5432 failed: Connection refused
< 4570 /div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0