How to handle these WebSocket connections?

I set up an HTTP service on my Runpod, but there are continuous WebSocket connection requests coming in. I want to understand why these requests are occurring and how to stop them. My service is being significantly disrupted by these requests.They seem to share the same internal IP and client ID: INFO: ('**', 55730) - "WebSocket /ws?clientId=6d901a86659e4e78bfcc32b69bd5f68f" 403 INFO: connection rejected (403 Forbidden) INFO: connection closed INFO: ('100.64.0.32', 39206) - "WebSocket /ws?clientId=6d901a86659e4e78bfcc32b69bd5f68f" 403 INFO: connection rejected (403 Forbidden) INFO: connection closed INFO: ('100.64.0.35', 36208) - "WebSocket /ws?clientId=6d901a86659e4e78bfcc32b69bd5f68f" 403 INFO: connection rejected (403 Forbidden) INFO: connection closed INFO: ('**', 33278) - "WebSocket /ws?clientId=6d901a86659e4e78bfcc32b69bd5f68f" 403 INFO: connection rejected (403 Forbidden) INFO: connection closed INFO: ('**', 35990) - "WebSocket /ws?clientId=6d901a86659e4e78bfcc32b69bd5f68f" 403 INFO: connection rejected (403 Forbidden) INFO: connection closed INFO: ('**', 46800) - "WebSocket /ws?clientId=6d901a86659e4e78bfcc32b69bd5f68f" 403 INFO: connection rejected (403 Forbidden) INFO: connection closed INFO: ('***', 33096) - "WebSocket /ws?clientId=6d901a86659e4e78bfcc32b69bd5f68f" 403 INFO: connection rejected (403 Forbidden) INFO: connection closed
6 Replies
nerdylive
nerdylive3w ago
do you build your custom docker image? what other services are running?
Poddy
Poddy3w ago
@ranarana
Escalated To Zendesk
The thread has been escalated to Zendesk!
nerdylive
nerdylive3w ago
maybe you should check with support too, they can check your pods too
ranarana
ranaranaOP3w ago
Thank you for your concern. I have configured multiple ports, but each service is set up as an HTTP service using FastAPI, and the people calling the services are also invoking them through HTTP. I have the same concern, but the good news is that, although I don’t know why, there are no more WebSocket requests coming in now.
nerdylive
nerdylive3w ago
Oh but when people connect form the external it doesn't appear in the logs like in your pasted text above right? It comes from external ip? Or is it like above coming from internalnip But maybe just a thought I think it's best to have runpod behind a proxy ( like you should connect runpod from a backend just to be more secure)
ranarana
ranaranaOP3w ago
Thank you for the suggestion! Previously, I used Runpod as a development and testing machine, so I only considered the simplest connection. If it's deployed to a production environment, this is indeed a very effective suggestion—amazing!

Did you find this page helpful?