I trust my server admins/hosts. It my own understanding which is probably questionable. Instead of Apache process, maybe I should of said "one http request which is being served by Apache". The point is that the webserver "request" is kept active/open/running for 10,000+ seconds supposedly because the php script isn't quiting or timing out like it should after 30-60 seconds. See the snippet below.
Though the script and service can handle much larger, I have imposed limits of 250KB for download and 1MB for upload. With the thousands of times a day this particular script is run, there are only dozens of these long running requests. But dozens of "active" yet "idle" processes becomes an unnecessary burden on Apache.
This is a snippet of what the host gives me. After they send me this, the host admins, in their words, "killed the threads by restarting the apache process."
root@host [~]# scoreboard |grep mydomain.com
14691 R mydomain.com -0.17% 13151.45s POST /compose.php HTTP/1.0
14765 R mydomain.com -0.09% 14508.07s POST /compose.php HTTP/1.1
14768 R mydomain.com -0.10% 14332.53s POST /compose.php HTTP/1.1
7589 R mydomain.com -0.10% 5623.43s POST /compose.php HTTP/1.1
21165 R mydomain.com -0.12% 11749.70s POST /compose.php HTTP/1.0
[many more deleted]
Which looks like the problem is in the upload. Before I turned off downloads, the problem was mostly occuring with GETs, which led me to believe there is something wrong in the download part, which is the code I posted earlier. Either way my script, despite timeout limits in php and curl, are not timing out. :mad:
I hope this information makes the problem clearer. The direction I should take for the solution is all I ask for 🙂