command-line-bootcamp / cli-boot.camp

:computer: command-line bootcamp adventure in your browser
https://cli-boot.camp/
Other
102 stars 51 forks source link

Controlling timeout / unresponsive terminal #50

Open yeban opened 4 years ago

yeban commented 4 years ago

Hi. I have set up a command-line bootcamp server (commit: bee2f50) for an online course. I am finding that the terminal pane becomes unresponsive after a while. The setup includes Nginx which proxies the connection to docker-browser-server. I am not using ssl.

Reasoning that a network timeout might be causing the terminal to become unresponsive, I increased proxy_read_timeout setting of Nginx to to 3,600 (1 hr). It helped to an extent. But the terminal pane does not stay responsive for 1 hr (in one test the terminal stayed responsive for ~25 minutes).

I was wondering if I might just be experiencing a 'network blip' causing the websocket connection to drop, or if it is something that can be controlled in the setup. I will try a few other Nginx timeout options, but just wanted to check with you first. A colleague was wondering if docker-browser-server uses ssh to run commands in the docker container and if so the timeout we might be seeing is coming from the ssh server. Do you think that is possible? Anything else I should consider?

alexmorley commented 4 years ago

'network blip' causing the websocket connection to drop

That seems like something that could happen. It's worth opening up browser tools and checking what happens with the websocket connection during that time. If there's an error status code that might be helpful to work it out. For the hosted version its on Digital Ocean and I don't have anything fancy in the nginx config other than ssl setup (which is there on the readme).

A colleague was wondering if docker-browser-server uses ssh to run commands in the docker container and if so the timeout we might be seeing is coming from the ssh server.

No ssh here so don't think that's a possibility.

alexmorley commented 4 years ago

If you get anymore info please feel free to post it here and I'll try and give some ideas :)

yeban commented 4 years ago

That's helpful, thanks. I will keep you posted. For now, I must add that the timeout / unresponsive terminal I am experiencing is after a few minutes of inactivity.