By imkyaky
Hi there,
I’m using Nginx+Varnish for web. My current ram is at 70% of the totally ram. Sawp is not using. plenty cache left. However, my site easily dies and get 502 error when I or someone use apache “ab” pressure testing. As soon as get these requests, the memory reaches to full and get 502 error. I used “DoS Deflate” for protection. but it only checks every 60sec. before it checks, the site could have already been down.
I notice the outgoing bandwidth of DO is not enough which is one of the reason causing this problem. I have another 10/year VPS with low setup running a site from other provide takes the same test. it can process and send 30M/s outgoing data which is fine and hardly dies. I’m not saying their are better. I like DO but recently this issue is annoying me.
any solution? thanks in advance.
Cheers
Frank
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Try assigning a lower memory limit for Varnish. Is your site static? If not, it could be a problem with your script – try running ‘ab’ against a static file.
What OS are you using for the droplet? Also I don’t have a lot of experience with ab - but as far I remember it is designed for apache, not for nginx. I think Varnish can use a lot of memory. <br>My configuration is Ubuntu(512 RAM) with swap and apache2 with a little bit tweaked configurations(as well as for mysql), and I am using fail2ban for basic protection - it serves well against scripts like slowloris and killapache - but before clean the connections the server is on the edge and some of the services can go down - that’s why I am using monit as well.
Hi Chupa, <br> <br>thanks for your reply. My droplet is 512mb Debian 7 64bit. I will try other solution. I don’t think 64bit system is the problem eating up too much resource. Easily dies when attacker is using http GET. <br> <br>Cheers <br> <br>Frank
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.