Skip to content

Can't run Plausible CE on VPS Ubuntu 22.04 : connection not available and request was dropped from queue after 2997ms #247

@Lyro1

Description

@Lyro1

Hey there!

I am trying to install an instance of Plausible Analytics CE on my VPS. Here is what I did:

$ git clone -b v3.0.1 --single-branch https://github.com/plausible/community-edition plausible-ce
$ cd plausible-ce

My folder seems fine:

$ ls -la
total 32
drwxr-xr-x  4 me me 4096 Jul  2 06:38 .
drwxr-xr-x 18 me me 4096 Jul  2 06:38 ..
drwxr-xr-x  8 me me 4096 Jul  2 06:38 .git
-rw-r--r--  1 me me  124 Jul  2 06:38 .gitignore
-rw-r--r--  1 me me 1076 Jul  2 06:38 LICENSE
-rw-r--r--  1 me me 3787 Jul  2 06:38 README.md
drwxr-xr-x  2 me me 4096 Jul  2 06:38 clickhouse
-rw-r--r--  1 me me 3405 Jul  2 06:38 compose.yml

I added a .env:

BASE_URL=https://infos.my-domain.com
SECRET_KEY_BASE=[...]
HTTP_PORT=8280

And the compose.override.yml:

services:
  plausible:
    ports:
      - 127.0.0.1:8000:${HTTP_PORT}

Then I try to start it:

$ docker compose up -d
[+] Running 3/3
 ✔ Container plausible-ce-plausible_events_db-1  Healthy                                                                                                0.5s 
 ✔ Container plausible-ce-plausible_db-1         Healthy                                                                                                0.5s 
 ✔ Container plausible-ce-plausible-1            Started                                                                                                0.7s 
$ curl --head http://localhost:8000
curl: (56) Recv failure: Connection reset by peer

And if I take a look at the logs:

plausible-1  | Loading plausible..
plausible-1  | Starting dependencies..
plausible-1  | Starting repos..
plausible-1  | ** (MatchError) no match of right hand side value: {:error, {:error, %DBConnection.ConnectionError{message: "connection not available and request was dropped from queue after 2997ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\n\n  1. Ensuring your database is available and that you can connect to it\n  2. Tracking down slow queries and making sure they are running fast enough\n  3. Increasing the pool_size (although this increases resource consumption)\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\n\nSee DBConnection.start_link/2 for more information\n", severity: :error, reason: :queue_timeout}}}
plausible-1  |     (plausible 0.0.1) lib/plausible_release.ex:148: anonymous fn/2 in Plausible.Release.createdb/1
plausible-1  |     (elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
plausible-1  |     (plausible 0.0.1) lib/plausible_release.ex:147: Plausible.Release.createdb/1
plausible-1  |     nofile:1: (file)
plausible-1  |     (stdlib 6.2.2) erl_eval.erl:919: :erl_eval.do_apply/7

And the containers:

$ docker compose ps
NAME                                 IMAGE                                        COMMAND                  SERVICE               CREATED          STATUS                         PORTS
plausible-ce-plausible-1             ghcr.io/plausible/community-edition:v3.0.1   "/entrypoint.sh sh -…"   plausible             2 minutes ago    Restarting (1) 8 seconds ago   
plausible-ce-plausible_db-1          postgres:16-alpine                           "docker-entrypoint.s…"   plausible_db          10 minutes ago   Up 10 minutes (healthy)        5432/tcp
plausible-ce-plausible_events_db-1   clickhouse/clickhouse-server:24.12-alpine    "/entrypoint.sh"         plausible_events_db   10 minutes ago   Up 10 minutes (healthy)        8123/tcp, 9000/tcp, 9009/tcp

For context, I am working on a Ubuntu 22.04 VPS, and I plan to expose the Plausible service via an Nginx Reverse Proxy.

Do you have any idea where my issue may come from?

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