Hi,
After some simple stress testing on my server, I can confirm the "too many open files" error is related to HTTPS.
First, I run the server with https disabled. In 10 minutes it got about 100,000 requests. The server's physical and virtual memory grows and shrinks, but they are quite normal. And it used 4 threads to process the requests constantly. There is no TCP connections using lsof.
Then, I enabled HTTPS and run the same test. I just made about 250 requests. During this period, the physical and virtual memory of the server are growing continually. And it's using more and more threads, it grows to more than 200 threads in the end of the test (I don't know if they are green thread or native thread). There are lots of TCP connections in CLOSE_WAIT state in the result of lsof command. These resources (threads, connections, memory) are never released.
I'm testing on my Mac.
Do you have any idea on where the problem could be? Thanks.
Eric