DBI is supposed to install the driver when you call connect(), although
that does mean any code loaded there isn't shared in memory.

My question would be, did you get any actual failed responses in your load
test, or just these error log messages? If all the requests succeeded, then
I would suspect something where this code is somehow being run from the
parent process. (Sorry if my terminology is off; I'm a mod_perl 1 user.)

If not, it could be that your validatephone.pl code does fine when the
connection is opened for it by connect_on_init(), but after a connection
gets closed for some reason, it can't reconnect because the environment is
different. Maybe the path for shared objects is different at that point.
I'd try to figure out what's giving it that "not initialized" text in the
error message.

Other things to consider:
- Are your DBI/DBD modules compiled with the same Perl that mod_perl was
compiled with?
- Are you setting any ENV variables that might be needed by DBI/mysql and
might not get passed through to the child process?

On Thu, Oct 10, 2024 at 11:02 AM Tim Lank <timl...@timlank.com> wrote:

> Thanks Ed.  I'll add it and see if it helps.  My load testing phase is
> already completed, but I may get a chance to retest next year.
>
> On Thu, Oct 10, 2024 at 6:32 AM Edward J. Sabol <edwardjsa...@gmail.com>
> wrote:
>
>> On Oct 7, 2024, at 5:55 PM, Tim Lank <timl...@timlank.com> wrote:
>>
>> 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",
>>
>>
>> I don't know if it will help or not, but, before the above lines, your
>> startup.pl should also have the following lines:
>>
>> use DBI;
>> DBI->install_driver('mysql');
>> use Apache::DBI;
>>
>> Regards,
>> Ed
>>
>>

Reply via email to