How to solve MySQL server gone away error Maria Db update on cPanel and WHM?

This is related to new MariaDb upgrade from 10.1.41 to 10.1.42 and also for servers which were updated from 10.2.27 to 10.2.28

Go to solution ( Special Thanks to @Valetia )

You will see errors in following formats/messages:

  • No file or input found
  • MySQL Server has gone away
  • Connection to MySQL Server failed
  • sqlstate[hy000]: general error: 2013 lost connection to mysql server during query
  • General error: 2006 MySQL server has gone away
  • ERROR 2006 (HY000): MySQL server has gone away
  • ERROR 2013 (HY000): Lost connection to MySQL server during query

Log files (/var/lib/mysql/$hostname.err) will have or can have any of these errors:

  • assertion fail /home/buildbot/buildbot/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX/mariadb-10.2.28/storage/innobase/dict/dict0dict.cc line 1467
  • the resulting row size is greater than maximum allowed size (8126) for a record on index leaf page
  • stack_bottom = 0x0 thread_stack 0x49000 mysys/stacktrace.c:268(my_print_stacktrace)[0x5564e62807bb] sql/signal_handler.cc:209(handle_fatal_signal)[0x5564e5d4b4f5]

Other Symptoms:

/etc/init.d/mysql start
Starting MySQL/etc/init.d/mysql: line 159: kill: (10704) – No such process
[FAILED]


Solution:

yum downgrade MariaDB-* -y
whmapi1 update_updateconf RPMUP=manual UPDATES=manual

(run as root #)

This will downgrade MariaDb installation to previous version
Line 2 will cancel automatic update on WHM/CPanel installations

If you are not using WHM, use line 1 only OR you can downgrade the repository individually too

yum downgrade MariaDB-server MariaDB-common MariaDB-shared MariaDB-client MariaDB-compat MariaDB-devel

References:

Funny php bug due to hashing and is_numeric

So I was working on an automation project and was testing the api to upload entitites.

I used get parameters to send data and wrote a wrapper on server to process that. I used hashes (part of hashes to be precise) to identify the requester instead of using real names.

some name came up with hash

12200e7973d0eecd8d75da83e816783496e440e22210ee72cb5cf37f7989a8ff

I was using first 10 characters of this has which happen to be

12200e7973

If you notice, only alphabet is “e” and all others are digits.
But at the same time this is a number in scientific notation
just the way 1e3 is 1000 because of exponentiation involved. My partial hash string was also being converted and was close to infinity.

My api at the backend was checking the given parameter with is_numeric and in this case, my parameter “12200e7973is 100% numeric (EVEN IF I WAS STORING IT AS A STRING).
Hence my script was failing to save correct data and a major column was left empty in the tables.

This was another blunder by me at programming, but you can easily fix it if you use is_int instead of is_numeric because it would fail type checking via is_int.

Of course I had to edit some code with explicit type casting for other types of api calls which were using IDs instead of hashes to identify the users.

Example code: (This is Not the exact code, not recommended for production usage)

// API ENDPOINT
$user=isset($_REQUEST['user']) ?? $_REQUEST['user'] : 1;
// calling the function with string $user
abc ("xyz",$user);
// Normal code:
$user=$this->getLoggedInUser();
$userid=(int)$user; //explicit casting
//calling the same function with int val
abc("mnop",$userid);

What happened to googleforwork.com? Welcome the new cloudconnect.goog domain

So GoogleforWork.com is now being redirected to cloud.google.com and the same applies for its subdomain connect.googleforwork.com.

Earlier the campaigns at google work communities are now hosted at www.cloudconnect.goog

It is interesting to note that it uses .goog and not .google TLD, here is some more info about .goog TLD

In the past we have seen .google tld for many purposes like AI to Everyone at ai.google     and Google’s design lab and research on design technology

The future will be interesting in terms of TLDs when banks, tech giants and telecom companies are switching their websites to their own custom TLDs and regular people can hardly remember the apparently new gTLDs.