Service Unresponsive
clearpath-lb
PROOP

2 months ago

Hey there,

First, I love Railway - it's amazing and I am so happy to have discovered your platform. So thank you!

We ran into an issue yesterday where our Twilio instance wasn't able to connect to Railway. However, I went through the logs and can't find anything related and wanted to nail down why it happened and how I can eliminate this from happening again. I attached the error as a screenshot here. But we are using the container for WSS transcription service from Twilio. Any help would be appreciated.

Secondly, I am setting up a webhook for Slack but keep running into an issue when I test the web hook connection: Request failed
[Error] Fetch API cannot load https://hooks.slack.com/services/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 due to access control checks.

[Error] Failed to load resource: Preflight response is not successful. Status code: 400 (EDufTV5Ix1WUmpAIvO4AqDFN, line 0)

I have other Slack webhooks setup, and haven't had any issues, just this one here.

Thank you so much!

Solved$20 Bounty

Pinned Solution

domehane
FREE

2 months ago

yeah, removing the logging was definitely the main fix that 500 logs/sec was basically DoSing your own container and making it unresponsive when Twilio tried to connect

custom domain won't directly fix the WebSocket issue, but it's good to have for consistency. the logging was the real culprit, and since you haven't seen the error again, sounds like it's solved

14 Replies

brody
EMPLOYEE

2 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 2 months ago


domehane
FREE

2 months ago

where is the screenshot ?

and what do your Railway deployment logs show from the time Twilio tried to connect? , also how is your websocket server configured? are you listening on process.env.PORT (or the PORT environment variable) and are you binding to 0.0.0.0 or localhost? the answer to this questions will help me to help yoy


domehane
FREE

2 months ago

for the 2 issue slack webhook ;, are you calling it from browser JavaScript/client-side code (like testing in a web app)??


clearpath-lb
PROOP

2 months ago

My fault here is the screenshot attached.

Regarding the Slack Webhook, I am calling it from the Railway UI to test. I'll attach a screenshot of that also.

Attachments


clearpath-lb
PROOP

2 months ago

Railway UI Testing Slack webhook


clearpath-lb
PROOP

2 months ago

Railway UI Testing Slack webhook

Attachments


clearpath-lb
PROOP

2 months ago

Sorry not sure why uploading wasn't working! Okay @domehane here is my logs for that time around when it failed

Attachments


domehane
FREE

2 months ago

for issue 1 :

twilio error 31901, your logs show you're hitting 500 logs/sec rate limit, that's killing your container's performance. your WebSocket shows isConnected=false when Twilio tries to connect because the server's overwhelmed

so you should remove excessive console.logs (especially in loops/message handlers) and make sure you're binding to 0.0.0.0 not localhost : server.listen(process.env.PORT, '0.0.0.0') and finally add a /health endpoint that returns 200 so Railway knows when your WS is ready


domehane
FREE

2 months ago

for slack webhook, nothing's broken railway's "Test Webhook" button calls from your browser which triggers CORS errors Slack webhooks don't support browser calls, so railway sends actual webhooks server-side, not from the browser. just trigger a real event (deployment crash, alert) or test with curl and you'll see it works perfectly the test button failing is normal for slack webhooks


domehane
FREE

2 months ago

so fix your logging spam for Twilio and ignore the Slack test button ; let me knew the result


domehane
FREE

2 months ago

tell me if you need more help


clearpath-lb
PROOP

2 months ago

We removed the excessive logging and added a custom domain. Do you think that will help at all?

Haven't seen the issue yet since removing the logging and a custom domain.


domehane
FREE

2 months ago

yeah, removing the logging was definitely the main fix that 500 logs/sec was basically DoSing your own container and making it unresponsive when Twilio tried to connect

custom domain won't directly fix the WebSocket issue, but it's good to have for consistency. the logging was the real culprit, and since you haven't seen the error again, sounds like it's solved


clearpath-lb
PROOP

2 months ago

Awesome thank you so much! You're great! Appreciate the fast support and great community here!


clearpath-lb

Awesome thank you so much! You're great! Appreciate the fast support and great community here!

domehane
FREE

2 months ago

i'm always happy to help


Status changed to Solved brody 2 months ago


Loading...