php-apache-ubuntu icon indicating copy to clipboard operation
php-apache-ubuntu copied to clipboard

Container losing binding to localhost when hit with too many connections?

Open kapyaar opened this issue 1 year ago • 1 comments

I am seeing a strange behaviour.

I am using docker-compose, with the dockerfile as the build source. Everything is working. Now, if I use apache ab load test tool, with concurrent connections like 200-300 seems ok. But IF I give 1000 concurrent connections for example, all of a sudden the server stops responding. It took me a while to figure out but what is happening is, the server stops responding to localhost. It is still accessible under at 127.0.0.1. Restarting the container, rebuilding the container, nothing seems to work. If I restart the computer (windows), then it starts working. But I can replicate this issue, by simply doing the high concurrent connection load test.

I was wondering if you have seen this. I know I am overloading the server, but could happen, and I am not sure if it will cause the server to stop responding in an AWS environment?

kapyaar avatar May 31 '24 22:05 kapyaar

The apache config is tuned for low memory systems. 1,000 concurrent users is not the use case. I'm using this container to run hundreds of WordPress sites in AWS, Digital Ocean, etc without any issues.

Please run apache natively (without docker) using the provided apache.conf and test. If the problem persists, then you will need to change apache config to suit your workload. The steps to customize apache config is in the README.md.

rsubr avatar Jul 08 '24 02:07 rsubr