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

[Bug]: No connection to server #813

Open
ryshi opened this issue Jun 28, 2024 · 6 comments
Open

[Bug]: No connection to server #813

ryshi opened this issue Jun 28, 2024 · 6 comments

Comments

@ryshi
Copy link

ryshi commented Jun 28, 2024

Where is the problem occurring?

I encountered the problem while interacting with the server (Backend)

What browsers are you seeing the problem on?

Chrome

Current behaviour

app deployed through docker-compose.yml, everything seems good but error message occurs frequently
Screenshot 2024-06-28 at 16 04 43

Desired behaviour

No response

Steps to reproduce

  1. edit config(base_url) & docker compose start
  2. apisix gateway add service & router with websocket on
  3. login

Other information

I tried to add some test data, it run as desired, but error message poped up every few seconds.

@daniel-hiller
Copy link
Member

Is the container crashing?
check with docker compose logs

Whats about the proxy logs?

@ryshi
Copy link
Author

ryshi commented Jul 15, 2024

it works fine on web except the warning

there's no error in proxy logs

/app/node_modules/.pnpm/[email protected]/node_modules/pg/lib/client.js:132
      const error = this._ending ? new Error('Connection terminated') : new Error('Connection terminated unexpectedly')
                                                                        ^
Error: Connection terminated unexpectedly
    at Connection.<anonymous> (/app/node_modules/.pnpm/[email protected]/node_modules/pg/lib/client.js:132:73)
    at Object.onceWrapper (node:events:631:28)
    at Connection.emit (node:events:517:28)
    at Socket.<anonymous> (/app/node_modules/.pnpm/[email protected]/node_modules/pg/lib/connection.js:63:12)
    at Socket.emit (node:events:517:28)
    at TCP.<anonymous> (node:net:350:12)

Node.js v18.20.3

(process:19): VIPS-WARNING **: 02:08:44.587: threads clipped to 1024

@meltyshev
Copy link
Member

We had something similar with Postgres recently, it kept restarting and dropping all connections. Updating Postgres helped us. But in your case it might be something else.

@ryshi
Copy link
Author

ryshi commented Jul 17, 2024

Thanks for your information, I did use a remote PostgreSQL 16.2. Maybe there are the same problem.

We had something similar with Postgres recently, it kept restarting and dropping all connections. Updating Postgres helped us. But in your case it might be something else.

@JoeKer1
Copy link
Contributor

JoeKer1 commented Jul 22, 2024

I'm getting this as well, but I'm running in k8s and using a postgres 15 cloudsql server.

In my case I needed to add a backend config to add some timeouts for the websocket connections with the GCP Ingress class.

@ryshi
Copy link
Author

ryshi commented Aug 23, 2024

websocket throws timeout continuously
image

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

4 participants