Questions tagged [socket.io]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
2 answers
2k views

socket.io handshake fails on Google https load balancer

We have the following setup for Google HTTPS load balancer. Two Frontends: 1. HTTP traffic to static IP 2. HTTPS traffic to the same static IP(DNS configured to a domain name) Host and Path rules ...
Nunna Suma's user avatar
3 votes
0 answers
2k views

Nginx and Apache are very slow as reverse proxy for NodeJs app with socket.io [closed]

I installed Nginx on an Ubuntu server 14.04 as a reverse proxy to redirect traffic coming to a single IP address to multiple NodeJs running on different ports. It also redirects HTTP to HTTPS. Here's ...
vpx's user avatar
  • 133
2 votes
1 answer
1k views

Is it safe to pass my ssl key and cert files to socket.io? [closed]

I'm building a web chat using socket.io In order to communicate on port 3000 through https I need to pass my ssl key and cert files. Socket.io is an open source and I don't know how trustworthy it ...
Niv Apo's user avatar
  • 121
2 votes
1 answer
7k views

How to fix ws and socket.io memory leak?

I have read that there is a memory leak occurring in both node.js websocket modules ws and socket.io. It has existed for years and am wondering how to fix it. It is mentioned in the following, to name ...
Normajean's user avatar
  • 131
2 votes
0 answers
569 views

PM2 running but socket.io stops responding at times

I am using a hostgator vps with apache, for backend, I am using node.js and socket.io, it works fine but at times it just stops working. Pm2 is showing it online but it just stops responding. Can ...
DragoSupremo's user avatar
1 vote
1 answer
12k views

Nginx what is the right configuration for Socket.io?

If I have a node express server running on port 5003 import express from 'express' import { createServer } from 'http' import { Server } from 'socket.io' const app = express() const prod = process....
Álvaro's user avatar
  • 117
1 vote
1 answer
3k views

Socket.io with Sails.js/Node.js and NGINX on SSL: bad gateway

I just started venturing in NGINX and SSL. Using Ubuntu 16.04. I am running a Sails server on the standard 1337 port and just set up NGINX with SSL (using letsencrypt). Port 80 is redirected to 443 ...
noderman's user avatar
  • 131
1 vote
1 answer
1k views

Nginx + Socket.io + Nodejs: How to configure socket.io on custom path

Ubuntu 22.04 Nginx: 1.23.2 Nodejs: 12.22.9 Socket.io: 2.0.3 I had a basic Node.js chat room built in Apache2, but I migrated everything over to Ngnix and I'm having problems trying to get the chat ...
peppy's user avatar
  • 73
1 vote
0 answers
2k views

Socket.io error "Failed to load resource: net::ERR_CONNECTION_REFUSED" in Azure linux server

When opening this web page I get the following errors in the debug console: localhost:5005/socket.io/?EIO=3&transport=polling&t=NJKuQEf:1 Failed to load resource: net::ERR_CONNECTION_REFUSED ...
Innoomnia's user avatar
1 vote
0 answers
669 views

Socket.io proxy through Apache and its performance

I am trying to setup a server for a Socket.IO game, but we will also have a little landing page in php served through Apache. I managed to make the server work by doing a proxy from Apache to the ...
Friendly Zeppelin's user avatar
0 votes
1 answer
4k views

Nginx server blocks and socket.io - CORS

I have been running apps with this server blocks structure for sometime and it has never given me any problems. geo $authentication { default "Authentication required"; `Some ip number` &...
Álvaro's user avatar
  • 117
0 votes
0 answers
77 views

CORS handling for an external host serving source that connects to local socketServer

tldr; The idea is for a server to host javascript that connects to the connected-device's socketServer. MyDevice's Browser > http://myserver.local > socket.io().connect('http://myDeviceIp:5000');...
Kevin Biesbrock's user avatar
0 votes
1 answer
116 views

How do I setup a SSL certificate for an express.js server behind a load balancer?

I'm restructuring my server structure by splitting them up instead of running everything from one server. I looked here but that just specifies what I were already doing in the original setup with ...
ii iml0sto1's user avatar
0 votes
1 answer
264 views

Squid in docker returns 502 but works when run on host

I'm using the same config for squid 5.6 that runs on a host machine and in docker. When I run it on the host (Ubuntu 22.10) it works just fine but when I run it from ubuntu/squid image I get 502 bad ...
chingis's user avatar
  • 243
0 votes
1 answer
2k views

Nginx + Socket.io websocket closed before establishing connection issue

Hi i am running an express server with a socket.io server attached to it const { Server } = require("socket.io"); var server = http.createServer(app); /** * Adding Socket io implementation ...
Kaki Master Of Time's user avatar
0 votes
1 answer
77 views

How do you make nodejs server

This is some of the code in nodejs. const app = express(); const server = app.listen(3000); app.use(express.static("public")); console.log("Server is running"); const io = socket(...
Leo's user avatar
  • 1
0 votes
1 answer
2k views

"Bad Request" when sending request to Socket.IO app via Apache

What I have I have Socket.IO app letteraly from template const express = require('express'); const app = express(); const http = require('http'); const server = http.createServer(app); const { Server }...
RoyalGoose's user avatar
0 votes
1 answer
570 views

Deploy Laravel and Socket IO into Nginx

I've deployed my Laravel project that using socket io on nginx here is the server spec : NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora"...
Roby Firnando Yusuf's user avatar
0 votes
0 answers
289 views

NGINX deny all except websockets for Flask app

I have an Ubuntu server running Flask app under nginx, this is my conf: upstream flaskapp { server 127.0.0.1:5000 fail_timeout=0; } server { listen 80; server_name _; location / { ...
Igniter's user avatar
  • 101
0 votes
0 answers
2k views

Why is my Nginx-Socket.io-Express-Setup not working over HTTPS?

Locally it is working perfectly but as soon as I put it behind the Nginx reverse-proxy I get this in the Chrome Developer Console: GET https://127.0.0.1:8443/socket.io/?EIO=3&transport=polling&...
leonheess's user avatar
  • 144
0 votes
0 answers
80 views

How to distribute socket.io servers globally?

We have a Socket.io service that needs constant communication with Mongodb. We currently have a load balancer server, 16 containers in a server (due to nodejs being single threaded, we split processes ...
Ümit Yayla's user avatar
0 votes
1 answer
891 views

Openlitespeed as a WebSocket Proxy

I am building web applications related to the socket. And my application runs well without https, if it has https, it will not connect. And as guidance on nginx must configure additional proxy. But ...
gait's user avatar
  • 101
0 votes
1 answer
1k views

Nginx + Socket.io + Proxy

After reading several articles, I'm still unable to get my socket.io communication working via a nginx proxy. Below is my nginx configuration: map $http_upgrade $connection_upgrade { default ...
Anshul Koka's user avatar
0 votes
1 answer
2k views

Deployment of node js app listening on two separate ports under nginx

I have a simple node.js app that listens to two ports: on 8001 it sets up a simple webserver by doing var express = require('express'); var gHttpApp = express(); gHttpApp.use(express.static('public'))...
Neenster's user avatar
  • 101
0 votes
0 answers
426 views

Socket.io w/ node.js + nginx +mysql + php5-fpm Memory Leak?

I have a Debian VPS running node.js socket.io server + nginx + mysql +php5-fpm and the socket server seems to freeze with no messages and no errors. I noticed that the memory usage grows over time but ...
Marciel Fonseca's user avatar
0 votes
1 answer
138 views

nginx + php5-fpm + mysql too many queries per second?

I have a VPS Debian running a nginx webserver and 2 node.js servers, one with socket.io for suplying data for my website and another one for a bot. The socket server runs a lot of queries but I try to ...
Marciel Fonseca's user avatar