[mythtv-users] mythweb2 having some more problems
Kevin Ulmes
kevinulmes at cybermail.net
Fri Aug 8 11:05:50 EDT 2003
> On Thursday 07 August 2003 09:11 pm, Chris Petersen wrote:
> > > May be a problem with it leaving connections open in the backend,
> > > but I dunno...
> >
> > why open lots of database connections? Shouldn't one always-open
> > connection do the trick? Just buffer query output when you
> need to nest
> > loops based on query info.. then again, I'm just talking php/perl
> > speak here - don't know much about the C side of things.
>
> The mysql client lib isn't threadsafe, and neither is the
> part of Qt that uses
> is. So, I've gotta have one connection per thread that wants
> to use the
> database.
>
> Isaac
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-> bin/mailman/listinfo/mythtv-users
>
I have noticed in the MySQL process list I've had up to 10 processes
used by MythTV at a time. Usually all of them are sleeping. I also
noticed that at any given time I typically have 10 mythbackend threads
running and up to 30 mysqld threads going. I was wondering if this was
typical of a mythbackend system. I started to notice the mysqld threads
getting out of control when I started using mythweb2 a few days ago.
I've been able to get rid of this error, by setting a low value for
wait_timeout in mysql. This doesn't fix the problem, but does get rid
of the symptoms. I believe that the problem is explained in the
following:
"You are probably using a multi-process web server such as Apache. Since
database connections cannot be shared among different processes a new
one is created if the request happen to come to a different web server
child process."
I found that in the PHP docs online talking about persistent database
connections. Unfortunately I'm kind of at a loss about how to solve
this one other than switching to non-persistent connections, or setting
a low wait_timeout like I mentioned above.
-Kevin
More information about the mythtv-users
mailing list