Webserver and pascal script problem lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- xinyiman · 2021-05-19 10:49 Hello everybody. I have a problem with one of my small programs. Basically a web server that interprets pascal code through pascal script. The example is trivial, but when I use the program massively the memory occupied goes up and is not freed until the program closes. Tested with ubuntu and mac os. The problem is replicated on both. To replicate the problem, download the attached file and unzip it. Then compile the project laz_https_server_test_ps/pkg/laz_http_server.lpi Then compile the console to stress the program laz_https_server_test_ps/console/pkg/console.lpi (requires installed indy) Both executables are created in laz_https_server_test_ps/bin/ Now run both programs (laz_http_server from the terminal), open the activity monitor and identify the laz_http_server line and monitor the memory occupied. Then move to the console that you have compiled and press the only checkbox you find and successively the button you find in the top left. Basically the console will take care of cyclically querying the laz_http_server program. When you want to block it, just uncheck the checkbox component. ---------------------------------------------------------------------- Ñuño_Martínez · 2021-05-21 09:25 I didn't test it but I guess the problem is that the program doesn't release resources when not needed.  Maybe you're creating a new conexion object everytime a request is made and then forget to release it (or to reuse it?).