RE: Problem with apache and mysql

[prev] [thread] [next] [Date index for 2005/03/10]

From: Alejandro Galue
Subject: RE: Problem with apache and mysql
Date: 13:53 on 10 Mar 2005
Hello,

Thanks for your comments, Tom

On Apache error_log appers the same error that is showed on the Web =
front
end:

DBD::mysql::db selectrow_arrayref failed: MySQL server has gone away at
/usr/lib/perl5/site_perl/5.8.5/handlers/ticket.pm line 2

This is my auth module and I see this error when it try to enter to the =
Web
front end

My application has two parts : One part collects stats and make =
reads/writes
on MySQL database and this procedure neves fails; so mysql is running. =
The
other part of the application is the one using a Web front end, =
therefore
the need for the connection from Apache to MySQL, but then apache says:
"MySQL server has gone away"

I'm using Apache::DBI but I'm not sure if it is working fine. First when =
I
compile and install this module, it shows that everything is fine =
including
tests (I'm using modperl2), but when I put Apache::DBI on startup.pl to =
init
my virtualhost with modperl it says :

"Apache.pm is not loaded."

I create Apache.pm like this:

package Apache;
1;

And then this error disappear, but I'm not sure if this horrible patch =
is
the reason of this failure. By the way, I don't have a clue on how to =
detect
if Apache::DBI is working or not ...

Now, because of this error I have tried removing Apache::DBI for my Web
front end, and from yesterday afternoon until now it works (I'm totally =
sure
that I'm closing each session explicity, so that shouldn't be the =
problem
...

Is Apache::DBI really helpful (if it's running in the same machine I'm
running MySQL) ?

How can I correctly configure Apache::DBI for Fedora Core 3 =
apache/modperl
rpm distribution ?

How can I configure debug mode for DBI in modperl applications and where =
can
I see the messages log ? Any suggestions ?


Thanks,
___________________________________

    Ing. Alejandro Galue.
    SYNC Consultores C.A.

    agalue@xxxx.xxx.xx
    http://www.sync.com.ve

    Telf. : +58 (212) 762-85-55
                      762-30-12
                      762-86-93
    Cel.  : +58 (414) 134-47-23
    Fax.  : +58 (212) 762-66-71
    Skype : agalue
    MSN   : agalue@xxxxxxx.xxx
___________________________________

-----Original Message-----
From: Tom Schindl [mailto:tomAtLinux@xxx.xx]=20
Sent: Wednesday, March 09, 2005 6:01 PM
To: Alejandro Galue
Cc: modperl@xxxx.xxxxxx.xxx; Arturo Mart=EDn
Subject: Re: Problem with apache and mysql

Are there any messages in the Apache-Errorlog or in the one of MySQL.=20
Maybe you are opening connections and don't close them, ... . You could =
also
run the DBI in Debugging mode. Do you use Apache::DBI?

Tom

Alejandro Galue wrote:

>=20
>
>Hello All,
>
>I'm using Fedora Core 3 with this packages version (RPM):
>
>httpd-2.0.52-3.1
>mod_perl-1.99_16-3
>perl-DBI-1.40'5
>perl-DBD-MySQL-2.9004-4
>libdbi-0.6.5-10
>libdbi-dbd-mysql-0.6.5-10
>mysql-4.1.9-1
>mysql-server-4.1.9-1
>mysqlclient10-3.23.58-4
>
>I downloaded source rpm for Mysql from fedora-development and rebuild=20
>on a updated fedora core 3.
>
>I have an application that run a script to read and modify mysql (this=20
>part works great), and the web interface for this application. This web =

>interface
>
>was created totally with mod_perl.
>
>After a certain amount of time, it cannot be possible to use the=20
>database frontend via web becase it cannot connect to database. This=20
>problem appears when we run the application in a limited RAM machine -=20
>128 - 256MB; before that we have never experience the problem. It has=20
>been working ok in HW with RAM between 386MB and 512MB RAM.
>
>I can enter to database manually and check status and mysql is up; but=20
>I need to restart apache to have the Web front-end working properly =
again.
>
>After some hours the failure shows up again.
>
>Anyone have any idea of what is happening here ?
>
>My guest is : the problem should be related to perl-DBI or mod_perl or=20
>maybe the configuracion of modperl or mysql. My questions in this case:
>
>- Does it sound like the place to look for the problem ?
>- Any tips on how to turn on the debugging on this components ? How to=20
>figure out which one is responsible for the failure and why  ?
>
>Thanks in advance,
>Alejandro Galue.
>
>
>
>
> =20
>





Problem with apache and mysql
Alejandro Galue 21:45 on 09 Mar 2005

Re: Problem with apache and mysql
Tom Schindl 22:00 on 09 Mar 2005

RE: Problem with apache and mysql
Alejandro Galue 13:53 on 10 Mar 2005

Re: Problem with apache and mysql
Gokul P. Nair 22:51 on 09 Mar 2005

RE: Problem with apache and mysql
Alejandro Galue 13:55 on 10 Mar 2005

RE: Problem with apache and mysql
Perrin Harkins 18:17 on 10 Mar 2005

RE: Problem with apache and mysql
Alejandro Galue 12:27 on 11 Mar 2005

Re: Problem with apache and mysql
Jay Scherrer 15:34 on 11 Mar 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52