Nothing glaring turned up in the logs when DBI debugs were turned on.

Along the lines of what Mithun conveyed, I did add this to the /etc/my.cnf
and it has seemed to cut the amount of errors in half or less from 6-8 down
to 2 or 3 per run.

[mysqld]
default-authentication-plugin=mysql_native_password

Ref:
https://dev.mysql.com/blog-archive/upgrading-to-mysql-8-0-default-authentication-plugin-considerations/


On Mon, Oct 7, 2024 at 7:28 PM Tim Lank <timl...@timlank.com> wrote:

> Good point.  I’ll try to ratchet up the debugs on those to see if anything
> pops out
>
> On Mon, Oct 7, 2024 at 6:58 PM Adam Prime <adam.pr...@alum.utoronto.ca>
> wrote:
>
>> You may need to dig into the code in DBI, or DBD::mysql to understand
>> what is happening (or not happening) in the rare occasions that this
>> occurs. Without the ability to consistently reproduce the issue all we can
>> really do is look at the code and make educated guesses.
>>
>> Adam
>>
>> On Oct 7, 2024, at 5:56 PM, Tim Lank <timl...@timlank.com> wrote:
>>
>> 
>>
>> You don't often get email from timl...@timlank.com. Learn why this is
>> important <https://aka.ms/LearnAboutSenderIdentification>
>>
>> Apache::DBI experts:
>>
>> I have the following in my startup.pl:
>>
>> use CGI qw(:all);
>> use CGI::Carp 'fatalsToBrowser', 'carpout';
>> use List::Util 'shuffle';
>> CGI->compile(':all');
>> Apache::DBI->connect_on_init
>>   ("DBI:mysql:holidayshop",
>>      "dba",
>>      "theactualpw",
>>     {
>>        PrintError => 1, # warn() on errors
>>        RaiseError => 0, # don't die on error
>>        AutoCommit => 1, # commit executes immediately
>>     }
>>   );
>> $Apache::DBI::DEBUG = 0;
>> 1;
>>
>> mysql> SHOW VARIABLES LIKE 'wait_%';
>> +---------------+-------+
>> | Variable_name | Value |
>> +---------------+-------+
>> | wait_timeout  | 300   |    (I have set this to 172800 as well, but it
>> somehow doesn't stick)
>> +---------------+-------+
>> 1 row in set (0.01 sec)
>>
>> mysql> SHOW global VARIABLES LIKE 'wait_%';
>> +---------------+--------+
>> | Variable_name | Value  |
>> +---------------+--------+
>> | wait_timeout  | 172800 |
>> +---------------+--------+
>> 1 row in set (0.00 sec)
>>
>> mysql> SHOW session VARIABLES LIKE 'wait_%';
>> +---------------+-------+
>> | Variable_name | Value |
>> +---------------+-------+
>> | wait_timeout  | 300   |      (I have set this to 172800 as well, but it
>> somehow doesn't stick)
>> +---------------+-------+
>> 1 row in set (0.00 sec)
>>
>>
>> I am load testing by sending about 300 page requests that utilize the
>> database every minute or so for the period of an hour.
>>
>> Consistently I see about 6-8 occurrences of the following error in my
>> Apache error log for the hour no matter what I seem to do:
>>
>>  -e: DBI connect('holidayshop','dba',...) failed: Authentication plugin
>> 'mysql_native_password' cannot be loaded: not initialized at
>> /var/www/holidayshop/perl/validatephone.pl line 16.
>>
>> The actual line #16 in the code is:
>>
>> my $logdb = DBI->connect('DBI:mysql:holidayshop', 'dba', 'theactualpw');
>>
>> Hundreds of thousands of connections occur either outright or out of
>> cache without error and work just fine.   The only problem is these 6-8
>> errors in the log.
>>
>> Can someone clue me in on what to do in order to try and eliminate any of
>> the errors from happening when doing a load test like this?
>>
>> Server Version: Apache/2.4.57 (AlmaLinux) OpenSSL/3.0.7 mod_perl/2.0.12
>> Perl/v5.32.1Server MPM: eventServer version: 8.0.39 MySQL Community
>> Server - GPL
>>
>> Thanks,Tim
>>
>>

Reply via email to