ACDB  Log In Search
Random
Light/Dark Theme
Site Map
SMASH
or
PASS
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

Who Board | New Thread

Yesterday 10:42 pm
Anonymous
Who is this ?

Buy Me a Coffee at ko-fi.com

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

10 fun things to do on ACDB

Advertise - Ko-fi - Share - Mascot - Contact - Discord - API - Wiki - Site Map - Change Log - アニキャラベー - The Nature DB - Twitter - Instagram - Privacy Policy - Rules
All images are copyright of their respective owners. Copyright © Goral Software

Rendered in 17.2 ms. R-7-W-3-M-2999.74 KB