ACDB  Log In
Search
Random
Light/Dark Theme
Site Map
Happy Birthday Chikara Ennoshita
Server Performance Aug 15, 2018 | Rei
Finally, found a solution to intermittent server performance issues.

At all times, we have a lot of bots accessing ACDB. As far as Google Analytics is to be trusted, of our 500,000 - 1,000,000 daily page views, roughly 10% are from human sources. That other 90% is a legion of bots set upon us.

Our web server works a little weirdly in that for each connection, it allocates roughly 256 file descriptors. So it was giving me a useless error stating "out of fds" as it crashed. I set up trips and traps to monitor at a kernel level how many fds were actually in use as tracked by the OS, and it never went much beyond 3000. So how in the world could more than 5000 have been exceeded by the web server? It's that fractional reserve banking like counting, it is.

Even then, all I learned was another config value, one that turned a hard crash ( non-recoverable ) into a soft crash ( recoverable ).

Still, performance was shit. And it made no sense to be soft crashing over and over and over again.

So I turned my attention to the firewall. It's quite amazing how even after all these years, you can't have a firewall rule with two limit conditions.

You can
A) limit the connections per IP
B) limit the connections per rule
but not both.

I can not say a max of X IP's get Y connections each to a max of Z connections. Nope.

Made no diff anyways, more connections STILL came in than the server could handle. There was no 1-1 ratio here.

Thinking my only resource would be to hack the code myself to give me more info, I came across a better solution using mod_status. At one glance I understood the problem, the solution, and the action to take.

We're now severing 30 requests per second with 80% slack capacity.

Bring on the traffic !

Go Top

Anime Characters Database Logo Links

Contribute

This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more [close]

Who Board | New Thread

01:02 am
Anonymous
Who is this?

Latest Comments


Shoto Todoroki

Shoto is the first character (from my first anime that I ever watched) that I had taking a liking to from the start! - ilikememes0

Quotes

you won't be so rude to me! - Ranpo Edogawa

If you doubt me, I'll show you. - Ranpo Edogawa

Let's see... - Ranpo Edogawa

Anime Art Academy Free Taster Course

Increase your fun by becoming a member today! Login | Register

10 fun things to do on ACDB

Advertise - Share - Mascot - Contact - Discord - API - Wiki - Site Map - Change Log - Twitter - Instagram - Coffee! - Privacy Policy - Rules
All images are copyright of their respective owners. Copyright © Goral Software

Rendered in 3.6 ms. R-13-W-2-M-3200.58 KB