Deno.serve() with SSL cert timeout
I have a very simple script that serves a
After some time (randomly) it stalls and no new request goes through.
main.ts:
curl response:
Can it be caused by something unstable inside Deno.serve?
/ping/ping route.After some time (randomly) it stalls and no new request goes through.
main.ts:
import { Hono } from 'https://deno.land/x/hono@v3.11.10/mod.ts'
import { basicAuth, logger } from 'https://deno.land/x/hono@v3.11.10/middleware.ts'
const app = new Hono()
app.use('*', logger())
app.get(
'/ping',
(c) => c.text('pong')
)
const cert = await Deno.readTextFile('/root/fullchain.pem')
const key = await Deno.readTextFile('/root/privkey.pem')
Deno.serve({ port: 443, cert, key }, app.fetch)import { Hono } from 'https://deno.land/x/hono@v3.11.10/mod.ts'
import { basicAuth, logger } from 'https://deno.land/x/hono@v3.11.10/middleware.ts'
const app = new Hono()
app.use('*', logger())
app.get(
'/ping',
(c) => c.text('pong')
)
const cert = await Deno.readTextFile('/root/fullchain.pem')
const key = await Deno.readTextFile('/root/privkey.pem')
Deno.serve({ port: 443, cert, key }, app.fetch)curl response:
# curl -v https://localhost
* Trying 127.0.0.1:443...
* Connected to localhost (127.0.0.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* SSL connection timeout
* Closing connection 0
curl: (28) SSL connection timeout# curl -v https://localhost
* Trying 127.0.0.1:443...
* Connected to localhost (127.0.0.1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* SSL connection timeout
* Closing connection 0
curl: (28) SSL connection timeoutCan it be caused by something unstable inside Deno.serve?
# deno -V
deno 1.39.1# deno -V
deno 1.39.1