--inspect nodejs using tcp proxy?
dannyaziz
PROOP

a year ago

I'm trying to take memory dumps of my nodejs application in production deployed on railway, I've added --inspect=0.0.0.0:9229 to the NODE_OPTIONS and added a TCP proxy to my service in railway

But I'm unable to get it to work inside chrome://inspect/#devices, I suspect the proxying is working correctly

Has anyone successfully done this inside railway?

Solved

23 Replies

dannyaziz
PROOP

a year ago

d1860df3-e631-436e-afef-455312ce0277


a year ago

on render

?


dannyaziz
PROOP

a year ago

My bad, on railway. Just migrated from render


a year ago

haha fair enough


a year ago

what service?


dannyaziz
PROOP

a year ago

I notice when I curl the tcp proxied domain and port I get a response back from my nodejs app

My nodejs app is served on 3000


dannyaziz
PROOP

a year ago

frontend I'm trying to diagnose the memory leak that's happening


dannyaziz
PROOP

a year ago

If this isin't possible I guess I will dump some heapdumps to a remote location like this person did: https://discord.com/channels/713503345364697088/1178691418919813160/1178691418919813160


a year ago

looks like you also need the uuid?


dannyaziz
PROOP

a year ago

Hmm, it seems to redirect to my nodejs app instead


a year ago

isnt frontend a node.js app?


dannyaziz
PROOP

a year ago

Yes it is, but the debugger is on a seperate port (9229)


a year ago

on railway the debugger is now at 50647


dannyaziz
PROOP

a year ago

Yep but:

  1. It doesn't appear in chrome://inspect/#devices

  2. When I try to curl the proxied domain and port 50647 I get a response back from the nodejs app


a year ago

hmmm yeah, i do get html back from the tcp proxy


dannyaziz
PROOP

a year ago

I tried recreating the proxy to see if that would do it but to no avail


a year ago

but the debugger is on port 9229 -

# curl http://127.0.0.1:9229/
WebSockets request was expected

(from inside the container)


dannyaziz
PROOP

a year ago

Is there a way for me to ssh into the container?


a year ago

no there isnt


a year ago

well not natively


dannyaziz
PROOP

a year ago

I'll try to create heapdumps and upload them to a remote location for now


a year ago

sounds good


a year ago

!s


Status changed to Solved brody about 1 year ago


Loading...