Slow initial connection to database (php / mssql)

Our webserver and database server are on a local network and the webserver uses an IP address to connect to the database. $con = new \PDO(‘sqlsrv:Server=\sql2017;Database=dbname, $user, $pass); $con->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); The first page that calls this code will take about 4 seconds to run just the above code. Then I can refresh the page as…

tomcat return 400 error without invalid code

I use spring boot 2.0.6 tomcat version: 8.5.34 this wireshark is: GET /api/validate?token=666666H3z6k2fnP9eWsvBUfE0GTdJt4_IYMUa7yVTxzE-QkNBfYJMVIMY9K91XgtUTJNRDWgTY4c8FF3XYxcAg81QxV_G-jQGGyjhRyHJ2FTRMzjUA8hDx03bDwEIm HTTP/1.1 Accept: */* Host: Connection: Keep-Alive Accept-Encoding: gzip User-Agent: okhttp/3.8.1 HTTP/1.1 400 Transfer-Encoding: chunked Date: Wed, 20 Nov 2019 11:19:02 GMT Connection: close when I use curl to request ,it return 200 OK I don’t know the reason