hsvandrew 23 Posted January 14, 2019 (edited) I'm hoping this post helps future users creating Apache modules for Linux I'm not really sure why, but it was not possible to do anything time consuming in the '.dpr' section of the project for the Apache module. I'm not sure if perhaps apache starts the module up first under root then moves it to the user workers later. In our Windows ISAPI extension we started a startup thread from the DPR before application.run. Under Apache it seems to shutdown the thread started from the main process after a few seconds. We had to move our INIT code into TWebModule1.WebModuleCreate(Sender: TObject); and use a critical section to ensure it wasn't created multiple times. Obviously if anyone knows why, feel free to post. As an example, our startup code connects to a few socket servers to get some startup settings. We could not figure out why the code was getting part way through and just blocking and never receiving the socket response from the working server (after a few seconds/milliseconds) so the first few requests would work then stop. Once the code was moved as above all was fine again. Edited January 14, 2019 by hsvandrew Share this post Link to post