Thanks Perrin. The "end user" is getting the following:
HTTP/1.1 500 Internal Server Error Date: Tue, 08 Oct 2024 20:17:24 GMT Server: Apache/2.4.57 (AlmaLinux) OpenSSL/3.0.7 mod_perl/2.0.12 Perl/v5.32.1 Content-Length: 333 Connection: close Content-Type: text/html; charset=iso-8859-1 <h1>Software error:</h1> <pre>Can't call method "prepare" on an undefined value at /var/www/holidayshop/perl/validatephone.pl line 26. </pre> <p> For help, please send mail to the webmaster (<a href="mailto:redacted">redacted</a>), giving this error message and the time and date of the error. The version of Perl that mod_perl is using is apparently the exact same one as is on the system. mod_perl: Embedded Perl version *v5.32.1* $ perl -v This is perl 5, version 32, subversion 1 (v5.32.1) I'm not setting any ENV variables that I know of.. Perhaps you have some examples of these that come to mind that might be the case? Thanks again for your help. On Thu, Oct 10, 2024 at 12:28 PM Perrin Harkins <phark...@gmail.com> wrote: > 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 >>> >>>