Encountering strange behaviour where the HTTP serv...
# kotlin-native
n
Encountering strange behaviour where the HTTP server isn't always responding with the right body in the response. What might cause the strange behaviour to occur? The sample project can be found here: https://gitlab.com/napperley/http-server
I have switched the database to Sqlite, and made a interesting discovery. In the output Sqlite is reporting that it is running out of memory:
Copy code
[BE6FA700] [2020-07-14 14:42:52] [INFO response.c:186] [127.0.0.1] "GET /" 200 2 (Keep-Alive)
Cannot fetch data: out of memory
[BEEFB700] [2020-07-14 14:42:52] [INFO response.c:186] [127.0.0.1] "GET /" 200 2 (Keep-Alive)
Cannot fetch data: out of memory
[BCEF7700] [2020-07-14 14:42:52] [INFO response.c:186] [127.0.0.1] "GET /" 200 2 (Keep-Alive)
Cannot fetch data: out of memory
[BF6FC700] [2020-07-14 14:42:53] [INFO response.c:186] [127.0.0.1] "GET /" 200 2 (Keep-Alive)
Cannot fetch data: out of memory
[BDEF9700] [2020-07-14 14:42:53] [INFO response.c:186] [127.0.0.1] "GET /" 200 2 (Keep-Alive)
[BFF12780] [2020-07-14 14:42:54] [INFO response.c:186] [127.0.0.1] "GET /" 200 102 (Keep-Alive)
Very weird considering the memory usage for the Kotlin Native program remains stable (RES at 452 KB).
Note that Sqlite hasn't run out of memory for the last HTTP response, which means the data has been successfully retrieved from the database.