Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-07-03 Thread Tobias Kremer
> I don't know the details, but there is something about the way > PerlModule works in mod_perl 1 that causes it to load the module again > when apache restarts at startup (it runs yours conf file twice when > you start, as documented). Using an explicit use() puts an entry in > %INC and fixes the

Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-07-02 Thread Tobias Kremer
Quoting Tobias Kremer <[EMAIL PROTECTED]>: > Quoting Perrin Harkins <[EMAIL PROTECTED]>: > > How are you loading this? With a PerlModule call? Can you try > > loading it from a Perl section like this? > > > > use MyModule; > > > Wow, it seem

Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-07-02 Thread Tobias Kremer
Quoting Perrin Harkins <[EMAIL PROTECTED]>: > How are you loading this? With a PerlModule call? Can you try > loading it from a Perl section like this? > > use MyModule; > Wow, it seems that this fixes the problem! At least with my minimal application. Here's the debug output which looks qu

Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-07-01 Thread Tobias Kremer
Quoting Perrin Harkins <[EMAIL PROTECTED]>: > Yes, but what does it tell you on the first connection AFTER startup? > It should say whether it's making a new connection or not. Here's the complete debug output which suggests that the connection during startup is reused for the first request. On s

Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-07-01 Thread Tobias Kremer
Quoting Perrin Harkins <[EMAIL PROTECTED]>: > Ok. First, check that you're on the latest version. Then, turn on > the debug flag and see if it thinks it is reusing the startup > connection or not. Yes, I'm using the latest 1.07 release. I already had the debug flag on and it's correctly telling

Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-07-01 Thread Tobias Kremer
Quoting Perrin Harkins <[EMAIL PROTECTED]>: > On a closer look, you're not. You are keeping around your $foo > closure variable in handler(), as well as putting it in a global. > It's not obvious why that causes this problem. If you want to > determine whether Apache::DBI is malfunctioning for yo

Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-06-30 Thread Tobias Kremer
On 30.06.2008, at 17:10, Perrin Harkins wrote: It's not Apache::DBI that's caching it -- you're caching it. Don't put a database handle in a global before you fork. It will stay, and there's nothing Apache::DBI can do about it. Could you please show me the exact line in my example in which I

Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-06-30 Thread Tobias Kremer
Quoting Michael Peters <[EMAIL PROTECTED]>: > Tobias Kremer wrote: > > use vars qw( $dbh $thefoo ); > Why are you storing the DB handle in a global variable? > If you do that then Apache::DBI can't help you if the connection goes away. To make this variable availab

Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-06-30 Thread Tobias Kremer
Quoting Perrin Harkins <[EMAIL PROTECTED]>: > I don't see anything in this code, but you're not really showing us > much here. I think you'll need to try commenting out parts of it > until you find which part breaks it. I'd start with that > selectall_arrayref that you store. I can reproduce the

Re: Lost connection to MySQL server during query (was "Segfault when connecting during Apache startup")

2008-06-30 Thread Tobias Kremer
Quoting Perrin Harkins <[EMAIL PROTECTED]>: > On Mon, Jun 30, 2008 at 4:54 AM, Tobias Kremer <[EMAIL PROTECTED]> wrote: > > We never fork and I thought that Apache::DBI takes care of checking if a > > connection went stale by utilizing DBI's/DBD::mysql's ping()

Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-30 Thread Tobias Kremer
Quoting Perrin Harkins <[EMAIL PROTECTED]>: > On Fri, Jun 27, 2008 at 5:51 AM, Tobias Kremer <[EMAIL PROTECTED]> wrote: > > Now if I could just get rid of those annoying random "Commands out of sync" > and > > "Lost connection to MySQL server during

Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-27 Thread Tobias Kremer
Quoting Tobias Kremer <[EMAIL PROTECTED]>: > On 25.06.2008, at 20:58, Amiri Barksdale wrote: > > I had big trouble with DBD::mysql 4.007. I didn't get rid of my > > segfault problem running mod_perl 1.31 until I went back to 4.004. > > Thanx. It really looks

Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-25 Thread Tobias Kremer
On 25.06.2008, at 20:58, Amiri Barksdale wrote: I had big trouble with DBD::mysql 4.007. I didn't get rid of my segfault problem running mod_perl 1.31 until I went back to 4.004. Thanx. It really looks a lot like my problem: http://bugs.mysql.com/bug.php?id=36810 I'll try reverting to an ear

Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-25 Thread Tobias Kremer
Quoting André Warnier <[EMAIL PROTECTED]>: > I don't know if the above versions are imposed to you, but in case you > have a choice, I would recommend de-installing your Apache and mod_perl, > and re-install the Apache 2.2 version and the mod_perl that goes with it. > Apache 1.x and mod_perl 1.x ar

Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-25 Thread Tobias Kremer
Quoting Tobias Kremer <[EMAIL PROTECTED]>: > > - Ubuntu Feisty with apache-perl. > > - stock Ubuntu Perl 5.8.8 (which unfortunately comes with threads) > > - self-rolled DBD::mysql (against libmysqlclient15-dev), DBI and > Apache::DBI > > I should have mentioned t

Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-25 Thread Tobias Kremer
> - Ubuntu Feisty with apache-perl. > - stock Ubuntu Perl 5.8.8 (which unfortunately comes with threads) > - self-rolled DBD::mysql (against libmysqlclient15-dev), DBI and Apache::DBI I should have mentioned that we're using DBI 1.605, Apache::DBI 1.07 and DBD::mysql 4.007. The Ubuntu apache-perl

Segfault when connecting during Apache startup with Apache::DBI

2008-06-25 Thread Tobias Kremer
We have a mod_perl application that needs to connect to the database during Apache startup to prefetch some data. The database handle for this is not stored or re-used in any way. According to the documentation, Apache::DBI does not cache database connections made during server startup, so I shoul

[JOB] Perl/mod_perl Web Developer in Cologne, Germany

2006-12-12 Thread Tobias Kremer
urbia.com AG is looking for an experienced Perl/mod_perl Web developer (full-time) to support the development of our successful online community at www.urbia.de. More information (in German only) about the job can be found at: http://www.urbia.de/general/jobs/ -- Kind regards Tobias Kremer

Re: Memory Usage

2006-09-01 Thread Tobias Kremer
I suggest taking a look at the excellent mod_perl performance guide: http://perl.apache.org/docs/1.0/guide/performance.html -- Tobias Zitat von "Daniel B. Hemmerich" <[EMAIL PROTECTED]>: > We are concerned about how much memory we are using now that we are moving > to modperl. > > > > Are ther

Re: [mp2] *** glibc detected *** double free or corruption (fasttop)

2006-08-04 Thread Tobias Kremer
Hi Andreas, if you're using the Debian supplied packages for apache2, perl and mod_perl I'd try compiling them manually and see if that helps. This will also give you a Perl interpreter without threads (which have a negative impact on performance AFAIK). HTH, Tobias :) Zitat von Andreas Dembach

Re: (Database-)Object initialization during server-startup

2006-06-23 Thread Tobias Kremer
Zitat von Perrin Harkins <[EMAIL PROTECTED]>: > > Create a new instance of the mod_perl handler module during startup and > > refer to that for the handlers (code below). > > This module would then cache DB connections and provide a method for > > 'create or fetch current DB connection'. > > DBI->

Re: (Database-)Object initialization during server-startup

2006-06-23 Thread Tobias Kremer
Zitat von Perrin Harkins <[EMAIL PROTECTED]>: > You need to separate managing your database connections from caching > this data. They are not related, and there's no reason to do both in > one class. Either just call connect_cached all the time (it uses > Apache::DBI when it finds it loaded), o

(Database-)Object initialization during server-startup

2006-06-23 Thread Tobias Kremer
Hey guys, I'm wondering what's the best way to design a database-backed module which works completely on its own as well as within mod_perl (mp1). The module should make a database connection during object initialization (new). This connection should then be used by all methods which want to acces

Re: [slightly OT] Catalyst? Maypole?

2006-01-24 Thread Tobias Kremer
Zitat von Daniel McBrearty <[EMAIL PROTECTED]>: > I've been looking around at MVC frameworks a bit recently. RoR looks > good if you don't mind the language switch, but I'm also looking at > these two. Anyone have much experience of them, in tandem with > mod_perl? Feedback and thoughts? Catalyst

Re: mod_perl and mysql

2003-11-12 Thread Tobias Kremer
I'm quite sure that this happens because you're using mod_perl AND php compiled into the same apache. I've been running into this kind of trouble several times (on different machines with different apache/mod_perl/php versions - mod_perl was always compiled statically. I tried php statically and dy