Occasionally cannot connect

After setting up the server, occasionally it would be unable to connect to the the server. e.g. even the web designer gives a 502 bad gateway error. From the docker logs it seems that the SSL cert is invalid?
Some of the nginx logs:

138.19.191.214 - - [20/Aug/2021:09:40:32 +0000] "GET /robots.txt HTTP/1.1" 504 569 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36" "-"
2021/08/20 09:40:43 [error] 7#7: *3433 upstream timed out (110: Connection timed out) while SSL handshaking to upstream, client: 175.159.160.111, server: cbti.slashlaboratory.com, request: "GET /MC/admin HTTP/1.1", upstream: "https://35.232.13.66:8443/MC/admin", host: "cbti.slashlaboratory.com"
175.159.160.111 - - [20/Aug/2021:09:40:43 +0000] "GET /MC/admin HTTP/1.1" 504 569 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36" "-"
2021/08/20 09:40:57 [info] 7#7: *3430 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while SSL handshaking to upstream, client: 138.19.191.214, server: cbti.slashlaboratory.com, request: "GET /MC/admin HTTP/1.1", upstream: "https://35.232.13.66:8443/MC/admin", host: "cbti.slashlaboratory.com"
138.19.191.214 - - [20/Aug/2021:09:40:57 +0000] "GET /MC/admin HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36" "-"
2021/08/20 09:42:01 [info] 7#7: *3440 client timed out (110: Connection timed out) while waiting for request, client: 138.19.191.214, server: 0.0.0.0:443
2021/08/20 09:42:43 [error] 7#7: *3433 upstream timed out (110: Connection timed out) while SSL handshaking to upstream, client: 175.159.160.111, server: cbti.slashlaboratory.com, request: "GET /favicon.ico HTTP/1.1", upstream: "https://35.232.13.66:8443/favicon.ico", host: "cbti.slashlaboratory.com", referrer: "https://cbti.slashlaboratory.com/MC/admin"
175.159.160.111 - - [20/Aug/2021:09:42:43 +0000] "GET /favicon.ico HTTP/1.1" 504 569 "https://cbti.slashlaboratory.com/MC/admin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36" "-"
2021/08/20 09:43:01 [error] 7#7: *3438 upstream timed out (110: Connection timed out) while SSL handshaking to upstream, client: 138.19.191.214, server: cbti.slashlaboratory.com, request: "GET /MC/admin HTTP/1.1", upstream: "https://35.232.13.66:8443/MC/admin", host: "cbti.slashlaboratory.com"
138.19.191.214 - - [20/Aug/2021:09:43:01 +0000] "GET /MC/admin HTTP/1.1" 504 569 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36" "-"

Deepstream logs:

INCOMING_CONNECTION | from undefined (178.239.162.174)
AUTH_ATTEMPT | 178.239.162.174: AREQ{"client-version":1,"role":"participant","nickname":"MobileCoach Client User (Testing Studies)","intervention-pattern":"sleep2 backup","intervention-password":"123"}
AUTH_ERROR | http auth error: Error: socket hang up
INVALID_AUTH_DATA | invalid authentication data
CLIENT_DISCONNECTED | null

I run renew.sh and wait for a few minutes and it seems to be normal. Does anyone have this similar problem before?