-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https connection times out #8107
Comments
I have spun up a system on GCP (e2-medium, 2 vCPUs, 4 GB memory) with this code: import { listenAndServeTLS } from "https://deno.land/[email protected]/http/server.ts";
const body = "Hello HTTPS";
const options = {
port: 443,
certFile: "/etc/letsencrypt/live/denohttpstest.lcas.dev/fullchain.pem",
keyFile: "/etc/letsencrypt/live/denohttpstest.lcas.dev/privkey.pem",
};
listenAndServeTLS(options, (req) => {
req.respond({ body });
}); I have also set up uptime checks to see if it goes down. Let's see if I can reproduce this. |
I am using a 512 MB RAM, 1 vCPU, 20 GB SSD machine. But I could not see high resources usage. Otherwise just dm me and I send you my ssh key. |
I can confirm this bug. My test server went down exactly 5 hours (on the minute) after starting it. The entire server log:
I am going to rerun the test, but add more metrics to the log so we can tell what happens when. |
I've been battling this one as well.. and its a bit out of my league at the moment. Hoping @lucacasonato you can help! Thank you I don't know if the Illegal SNI hostname has anything to do with the ConnectionReset though opine might hide that from my log. |
more searching found this: https://en.it1352.com/article/6b9299e70af448e3a86b63562103ae4e.html
|
The server crashed again after a little over 7 hours. Log of server with |
In the mean time I am using nginx to reverse proxy https to http instead. That seems to have solved the immediate need for this fix |
12 hours later server crashed on http instead of https, related issue https://github.com/denoland/deno/issues/6319 Uncaught BrokenPipe: Broken pipe (os error 32) This might mean that Deno is unable to run a web api reliably at this moment? |
@lucacasonato One of the last lines in this log is...
This is the tsc stating it compiled the same file as the initial server.ts. Why did deno compiles that file twice? Actually it also compiled Anyway, the @timonson @lucacasonato @rvdende Maybe try again with the version 1.5? |
Strange that it would compile so far into the process, what could be triggering this? |
A guess is that we encounter some TLS error but don't propagate it properly. We should try setting up a TLS server and sending it some garbage data - does it crash? If so, we can probably easily fix it. |
@tveronezi I started a new https server with deno 1.5 after I read your post. It crashed after about 9 hrs again. If you need my |
For what it's worth, this seems to happen with the HTTP server and no TLS (just like @rvdende saw). We're running about 2k requests per second through the http server code and it seems like there are a whole bunch of uncatchable errors. It is difficult to keep running. ;) This PR is getting some of them, but the connection reset error we got still slipped through: #8365 Actually, seems like |
I believe this issue will be fixed in #8365 |
I'm gonna provisionally close this issue because #8365 has landed. Let's reopen if the problem keeps happening. |
Unfortunately this issue has not been resolved with the latest deno version:
|
This comment has been minimized.
This comment has been minimized.
I tested this with 1.6.0, server kept crashing after 9/10 hours. Tried it in latest canary on a 24/7 server and it's been almost 48 hours with no crashes whatsover. |
In my case, 18 days ago, it took 4 days until the server crashed. So please wait another couple of days @Soremwar . I started a new server 2 days ago, too (still running). |
@timonson Will keep you informed then. This is such a tedious bug to test 🙄 |
I am running a prod api using deno 1.8.1 and it is happening for me... It is NOT crashing; rather, after a bunch of those errors show up in the console, the server just locks up and all requests to it start timing out. It usually runs fine for 2-3 days. The protocol errors show up totally randomly btw; this is a very low-usage service and it is not being called when they are appearing. Current workaround is to have it auto restart every 24 hours, but a more robust solution would of course be highly appreciated... |
Same here (Deno 1.9.2). Currently looking for a workaround but I have trouble identifying even the source of the bug itself. |
Seeing this with deno 1.16.1 and oak |
occurs sometimes on incoming connections without any visible reason Deno 1.19.3 |
Still seeing this issue with Deno and Oak |
same |
I have a problem running an
https
server and I can't solve it on my own. I tried various things which include:The problem is that after an indeterminable time, but mostly about 20 hours, the server stops working in the sense that requests just seem to timeout:
curl: (28) Failed to connect to xyz.com port 443: Connection timed out
. Before this time period, everything works prefectly. But the deno process is still running and the port is still used:I don't use an nginx proxy server; just deno directly on a linux distro.
I execute deno with
sudo
and I also tried to start deno with pm2. In all cases it stops working after a couple of hours.The server runs on AWS Lightsail and I can rule out that a huge amount of requests is causing this (maybe 10 requests per hour).
I can also say with certainty that this does not happen with a deno
http
server nor with a nodehttps
server, which I both tested at least once for two days.There was no big CPU or memory load which I could see in the monitoring tools. I only respond with
hello world
to requests at the moment.If necessary I would be happy to give ssh access to somebody who knows how to debug this issue.
Thanks a lot!
The text was updated successfully, but these errors were encountered: