ufna / VaRest

REST API plugin for Unreal Engine 4 - we love restfull backend and JSON communications!
https://www.unrealengine.com/marketplace/en-US/product/varest-plugin
MIT License
1.05k stars 289 forks source link

Random request timeouts #421

Open cdmoss opened 10 months ago

cdmoss commented 10 months ago

My requests are timing out seemingly randomly. Sometimes they work fine, sometimes I get the following:

08-19 00:23:08.240 13502 13579 D UE4     : [2023.08.19-02.53.08:240][914]LogHttp: Warning: 0x6f31504060: HTTP request timed out after 180.00 seconds URL=https://my.domain.com/auth/check-token
08-19 00:23:08.263 13502 13579 D UE4     : [2023.08.19-02.53.08:263][915]LogHttp: VeryVerbose: 0x6f31504060: 'Closing connection 0'
08-19 00:23:08.292 13502 13548 D UE4     : [2023.08.19-02.53.08:292][917]LogHttp: Warning: 0x6f31504060: request failed, libcurl error: 0 (No error)
08-19 00:23:08.292 13502 13548 D UE4     : [2023.08.19-02.53.08:292][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 0 (  Trying 20.151.67.117:443...)
08-19 00:23:08.292 13502 13548 D UE4     : [2023.08.19-02.53.08:292][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 1 (Connected tomy.domain.com (20.151.67.117) port 443 (#0))
08-19 00:23:08.292 13502 13548 D UE4     : [2023.08.19-02.53.08:292][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 2 (ALPN, offering http/1.1)
08-19 00:23:08.292 13502 13548 D UE4     : [2023.08.19-02.53.08:292][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 3 (TLSv1.3 (OUT), TLS handshake, Client hello (1):)
08-19 00:23:08.293 13502 13548 D UE4     : [2023.08.19-02.53.08:292][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 4 (TLSv1.3 (IN), TLS handshake, Server hello (2):)
08-19 00:23:08.293 13502 13548 D UE4     : [2023.08.19-02.53.08:293][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 5 (TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):)
08-19 00:23:08.293 13502 13548 D UE4     : [2023.08.19-02.53.08:293][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 6 (TLSv1.3 (OUT), TLS handshake, Client hello (1):)
08-19 00:23:08.293 13502 13548 D UE4     : [2023.08.19-02.53.08:293][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 7 (TLSv1.3 (IN), TLS handshake, Server hello (2):)
08-19 00:23:08.293 13502 13548 D UE4     : [2023.08.19-02.53.08:293][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 8 (TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):)
08-19 00:23:08.293 13502 13548 D UE4     : [2023.08.19-02.53.08:293][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 9 (TLSv1.3 (IN), TLS handshake, Certificate (11):)
08-19 00:23:08.293 13502 13548 D UE4     : [2023.08.19-02.53.08:293][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 10 (TLSv1.3 (IN), TLS handshake, CERT verify (15):)
08-19 00:23:08.293 13502 13548 D UE4     : [2023.08.19-02.53.08:293][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 11 (TLSv1.3 (IN), TLS handshake, Finished (20):)
08-19 00:23:08.294 13502 13548 D UE4     : [2023.08.19-02.53.08:294][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 12 (TLSv1.3 (OUT), TLS handshake, Finished (20):)
08-19 00:23:08.294 13502 13548 D UE4     : [2023.08.19-02.53.08:294][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 13 (SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384)
08-19 00:23:08.294 13502 13548 D UE4     : [2023.08.19-02.53.08:294][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 14 (ALPN, server accepted to use http/1.1)
08-19 00:23:08.294 13502 13548 D UE4     : [2023.08.19-02.53.08:294][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 15 (Server certificate:)
08-19 00:23:08.294 13502 13548 D UE4     : [2023.08.19-02.53.08:294][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 16 ( subject: CN=my.domain.com)
08-19 00:23:08.294 13502 13548 D UE4     : [2023.08.19-02.53.08:294][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 17 ( start date: Aug 18 08:59:34 2023 GMT)
08-19 00:23:08.294 13502 13548 D UE4     : [2023.08.19-02.53.08:294][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 18 ( expire date: Nov 16 08:59:33 2023 GMT)
08-19 00:23:08.294 13502 13548 D UE4     : [2023.08.19-02.53.08:294][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 19 ( subjectAltName: host "my.domain.com" matched cert's "my.domain.com")
08-19 00:23:08.295 13502 13548 D UE4     : [2023.08.19-02.53.08:295][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 20 ( issuer: C=US; O=Let's Encrypt; CN=R3)
08-19 00:23:08.295 13502 13548 D UE4     : [2023.08.19-02.53.08:295][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 21 ( SSL certificate verify ok.)
08-19 00:23:08.295 13502 13548 D UE4     : [2023.08.19-02.53.08:295][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 22 (We are completely uploaded and fine)
08-19 00:23:08.295 13502 13548 D UE4     : [2023.08.19-02.53.08:295][917]LogHttp: Warning: 0x6f31504060: libcurl info message cache 23 (Closing connection 0)
08-19 00:23:08.295 13502 13548 D UE4     : [2023.08.19-02.53.08:295][917]LogHttp: VeryVerbose: FHttpRequestImpl::OnProcessRequestComplete()
08-19 00:23:08.295 13502 13548 D UE4     : [2023.08.19-02.53.08:295][917]LogVaRest: Error: Request failed (0): https://my.domain.com/auth/check-token

As you can see, the http logs appear to be going along just fine, until suddenly the connection is closed and the request fails. On my server, the requests are returning 200s.

ImagineTheGames commented 10 months ago

we are getting this same issue in 4.27.2 (we turned on loghttp=veryverbose and stepped through it and Unreal correctly receives the response, it just seems like something is failing to process it in VaRest perhaps, and it's only occasional which makes it harder to debug...