Questions tagged [socket.io]

26 questions
0
votes
0 answers

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 can't seem to find the reason. I kept track of…
0
votes
1 answer

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 keep them as low as possible, the bot runs some…
0
votes
0 answers

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'); How best to achieve this and are there any safety…
0
votes
1 answer

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 just 1 server. I'm having a structure like this: 2x…
ii iml0sto1
  • 101
  • 2
0
votes
1 answer

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 gateway error. Squid config: acl localnet src…
chingis
  • 243
  • 3
  • 14
0
votes
1 answer

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 */ const io = new Server(server, { cors: { origin:…
0
votes
1 answer

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(server); It works on local host. What do you have to do for anyone…
Leo
  • 1
0
votes
1 answer

"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 } = require("socket.io"); const io = new…
RoyalGoose
  • 103
  • 5
0
votes
1 answer

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` "off"; } server { listen 80 default_server; …
Álvaro
  • 117
  • 1
  • 2
  • 8
0
votes
1 answer

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" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7…
0
votes
0 answers

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 / { add_header "Access-Control-Allow-Origin"…
Igniter
  • 101
1
2