[rt-users] RT3 is spawning 2 additional processes every time something is done

AJ rt at musefoundry.com
Thu Jan 8 15:29:45 EST 2004


Depending on your OS..

For linux each 'thread' shows up in the ps output as mysqld process.  So for
instance, if you have 20 connections to the db, youll see 20 mysqld
processes.  Having a number of mysqld processes isn't a huge issue unless
you have system resource problems. For example, I manage a website on the
side that gets in the neighborhood of 300,000 page views a month. On any
given day that RedHat box shows at least 60 or so mysqld processes.

For Solaris and I believe AIX and HP (don't quote me on the last two) you'll
just see the memory size of the mysqld process get larger but only one
mysqld process.

It could also be a threading issue.  For instance, on the later versions of
RedHat, Perl is compiled with threading enabled.  I also believe that the
mysql/client binary distributions are compiled with threading and
thread_safe enabled.  In this case you would want to make sure that the
webserver is compiled with threading enabled.  If using mod_perl, it would
give you a warning about that when compiling as a DSO (external module)
against apxs on apache.

Additionally, mysql has several threading params.  First there is
thread_concurrency.  Even though I haven't seen this on the web, I have
several development manuals for mysql 4.x and they all say that this only
applies to Solaris.. but wouldn't hurt to set even if you don't have it.  

There is also thread_cache and thread_stack_size.  

For mysql itself you could also try modifying the connection params in the
my.cnf.
max_connections to something respective of how many connections you may
expect     
wait_timeout the default is something huge, like 300 seconds or something.
Lower it to 60 seconds or something like that.  
interactive_timeout this is also high, you can also try reducing this.  

The timeout params will at least clean up connections made to the db as
opposed to holding them.

One more thing to do when you notice bad things happening is:
Either log in as root and : show processlist
Or
./mysqladmin -u <admin user> -p processlist

Both of these will give you a list of the running processes and what they
are doing.


The mysql config is probably the easiest way to fix the issue.  You want to
try and stay away from recompiling apps, especially if you are on a box that
uses RPMs and such.

In the end, the issue is not RT specifically. RT is simply identifying some
problem that has always existed, but not seen until activity gets high.

A.J.
     

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Frank Saxton
Sent: Thursday, January 08, 2004 1:44 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] RT3 is spawning 2 additional processes every time
something is done

I have been running RT3 for several months with no problems whatever.  The 
hard drive recently went bad on the server and I had to restore everything 
from tar files.  Not everything copied back automatically so my current 
problem could be nothing more than a missing file somewhere.

When I start mysqld, I have 4 /usr/libexec/mysqld --defaults-.... processes 
running

Every time I do something (log in, click a link, refresh the view), 2 more 
mysqld processes are started.  This continues until something around 14 
processes are running at which time the RT web connection dies.  Restarting 
mysqld will restore operation again (briefly).

I'm sure that this is going to be a simple fix but unfortunately I am not a 
DBA and I have very limited RT experience.  As near as I can see, 
everything else is working great.  RT3 worked perfectly before the disk 
problem. The dependencies test for mysql passes.  Any help would be hugely 
appreciated.  Thanks in advance!

_______________________________________________
rt-users mailing list
rt-users at lists.bestpractical.com
http://lists.bestpractical.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm




More information about the rt-users mailing list