ACDB  Log In
Search
Random
Light/Dark Theme
Site Map
Happy Birthday Minami Hishida
Daily Maintenance Feb 3, 2020 | Rei
At midnight server time for about a minute you might notice:

Kyaa!
Come back in a minute please! Doing some daily maintenance.


I've consolidated a few daily maintenance scripts to run while the site is now taken offline. This should allow maintenance to be completed more quickly without the bottleneck lag spikes that had been occurring previously.

The bottleneck problem I had been struggling to find a solution to for the past few months turned out to be one of those cases where "the problem is not where you are looking". I was so convinced some legacy MyISAM table was locking, or some query was holding everything up - yet nothing ever showed up in my slow query log.

When I started work consolidating the daily maintenance scripts, I noticed one of those worked on a separate database system. Originally I designed it to be a lightweight, fast, efficient no cost replacement to PHP sessions. Except at midnight, when it purges old records ..... apparently scanning a 151MB block of data can take some time. And while it is doing that, a little chunk of code blocks EVERYTHING.

A while back I implemented a circuit breaker that would test the number of active MySQL connections and serve a 503 and terminate before the connection limit is hit. Except before it can do that, it needs to connect to the database. And after connected it does my SS code which I assumed had no cost. With that blocking, it never reached the code to check if the connection limit had been reached, and thus managed to exceed the limit that it was coded not to exceed. lol Once again proving having the right code is meaningless when it is not in the right order. ≻≺ Another problem for another day.

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

02:26 pm
Anonymous
Who is this?

Latest Comments


Mikoto Mikoshiba

HOT - Anonymous

Quotes

You may do whatever you want with me... - Ingrid

Big Brother... - Ingrid

Th-Thank you! - Ingrid

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-3198.59 KB