Hi, currently my VPS seems to be getting very heavy traffic (as I am mirroring autopatcher)
Well its heavy for me, nearing 15 gigs today and thats while its been having problems due to the load. It might not be the bandwidth though that is the actual problem.
I am getting QOS errors on tcpsndbuf and kmemsize
I am still trying to develop the skills to understand how specific parts of my website handle the load (ie which parts are using most cpu resources, memory resources etc).
People are directed onto my site at filevortex.net/files/upload/autopatcher.php
I understand things are set up simply at the moment. I am totally redesigning the site (and looking at tailoring some CMS systems: trying both typo3 and Joomla, and I can write moderately complex php code etc). Anyway I won't have time to put up my new site design for at least 1 week.
Well when traffic hits that page I mentioned, a simple PHP scripts handles the file download information but I have got it linking directly to the file.
I have used .htaccess to try and prevent any leeching by at least checking the http referer is from my site.
I suspect a problem with download managers making large amounts of concurrent connections...
Now I thought if I use a php script to handle this, won't it get flooded? For example each time the download manager tries to form a connection, won't the php script be executed, potentially trying to restore a session or something (if i use sessions etc), causing much load via PHP? What I mean is if the download manager tries to connect 20 times, then the php code will have to be executed 20 times... if I have 5 download managers trying to connect at once...
I did try and optimize apache, thats an issue in itself, but if you have any tips thats appreciated.
I am not sure what apache mods might help control concurrent connection per ip?
Also I am thinking of turning off non critical services at the moment.
I only have a 256 megs (512 burstable) VPS, fedora core 5, plesk
I understand I should probably upgrade for this sort of situation, that is something I am considering, but I need to get my head around what is going on.. I am on a heavy learning curve I also need to keep costs as low as I can.
Being a mirror for autopatcher means I get much heavier resource usage at one time of the month, and then near the end of the month the resource usage is typically about 1/10th (or less) of peak. Typically only the first 5 days are heavy.
Any advice, links, etc is *very* appreciated. I will submit a sys admin request for help soon, but I want to be specific about what I need done.
PS Of course you are all probably sitting on the knee of Santa Claws at the moment, saying "Santa, please upgrade my CPU and give me another gig of memory for christmas. Please find me a girlfriend (or boyfriend!) that I can plug into the spare PC on the other side of my bedroom"
Last edited by MichaelN2006; 12-22-2006 at 10:06 PM.
Hmm.. (Sorry to reply to myself again but editing seems to have expired)
I think the following apache mod: Mod_evasive might be the solution.
When typing in netstat i get a list of IP addresses with many IP addresses repeated OVER AND OVER again with various ports like: 41672, 20468 etc etc
One of the IP addresses is listed over 50 times. I'll look into this more (this sort of stuff is not my strong point) but i have to suspect that is an actual download manager flooding me?
Okay thanks. I will do that soon. It seems at the moment the flooding(?) has stopped and downloads are working at normal (excellent) speeds. I am not sure exactly what all those statistics are, but because they may be related to realtime performance I will wait until the problem starts again (as it almost certainly will unless some factor has changed that I am not aware of)
I am very much thinking though that this may mostly be a problem of too many concurrent connections.
Well I am new to linux but tried installing "dos deflate" on my fedora 5 VPS. Its an anti Denial of Service script but i thought it might be useful cause it can limit concurrent connections from the same IP (I have noticed some people seem to keep having up to 50 connections, and 10-20 is not uncommon)
It seems to be shell (sh) script.
It seemed to install fine, and the install is a install.sh file, and it worked
It tries to set a cron to occur every minute but when listing cron tasks it is not there?
trying to manually execute the script comes up with all these errors that don't make sense. It even seems to complain of errors on lines that just contain commented out code.
I also tried to install mod_evasive for apache but couldn't it came up with many warnings and I couldn't seem to find any docs for how to install this on fedora (the various file paths etc certainly don't match mine in the installation instruction)
I realize I need to do a lot of reading (when I have such time) but for now I am just trying to solve this problem so I can rest.
I will await some comments, someone must be able to give me some sort of hint I have felt close at times to a solutionm but the solution so far eludes me
You have found them now.. Support said you were talking to them
As for my prob well I have figured out solution and did manage to install an apache mod (mod_limitipconn), which is an *okay* mod I guess, but would like solution lighter on resources perhaps. Everything is functioning fine now though.