[rt-devel] Too Many Connections

Sam Johnston samj at aos.net.au
Wed Nov 27 23:54:08 EST 2002


I found that after a few minutes of playing with RT the layout broke and 
then I started getting 500 Internal Server Errors:

[Thu Nov 28 14:21:48 2002] [warning]: 
DBI->connect(dbname=rt3;host=localhost) failed: Too many connections at 
/usr/local/share/perl/5.6.1/DBIx/SearchBuilder/Handle.pm line 119 
(/opt/rt3/lib/RT.pm:220)
[Fri Nov 29 01:21:48 2002] [error] Connect Failed Too many connections 
at /opt/rt3/lib/RT.pm line 122

Turns out that MySQL had accrued heaps of connections (as per 
processlist following). I'm running RT 2.1.51 on Debian GNU/Linux 3.0 
with Apache 1.3.26-0woody1 and mod_perl 1.26-3.0woody1. My apache.conf 
(included in httpd.conf) contains:

*<VirtualHost 1.2.3.4:80>
  DocumentRoot /opt/rt3/share/html
  ServerName mybox.mydomain.com
  PerlRequire /opt/rt3/bin/webmux.pl
  <Location />
    SetHandler perl-script
    PerlHandler RT::Mason
  </Location>
</VirtualHost>
*
I'm going to have a stab in the dark and try adding:

PerlModule Apache::DBI
PerlFreshRestart On


mysqladmin -u root -p processlist
Enter password:
+-----+---------+-----------+-----+---------+------+-------+------------------+
| Id  | User    | Host      | db  | Command | Time | State | 
Info             |
+-----+---------+-----------+-----+---------+------+-------+------------------+
| 25  | rt_user | localhost | rt3 | Sleep   | 4303 |       
|                  |
| 26  | rt_user | localhost | rt3 | Sleep   | 4303 |       
|                  |
| 30  | rt_user | localhost | rt3 | Sleep   | 4202 |       
|                  |
| 31  | rt_user | localhost | rt3 | Sleep   | 4202 |       
|                  |
| 33  | rt_user | localhost | rt3 | Sleep   | 3813 |       
|                  |
| 34  | rt_user | localhost | rt3 | Sleep   | 3813 |       
|                  |
| 36  | rt_user | localhost | rt3 | Sleep   | 3810 |       
|                  |
| 37  | rt_user | localhost | rt3 | Sleep   | 3810 |       
|                  |
| 39  | rt_user | localhost | rt3 | Sleep   | 3789 |       
|                  |
| 40  | rt_user | localhost | rt3 | Sleep   | 3789 |       
|                  |
| 42  | rt_user | localhost | rt3 | Sleep   | 3782 |       
|                  |
| 43  | rt_user | localhost | rt3 | Sleep   | 3782 |       
|                  |
| 45  | rt_user | localhost | rt3 | Sleep   | 3779 |       
|                  |
| 46  | rt_user | localhost | rt3 | Sleep   | 3779 |       
|                  |
| 47  | rt_user | localhost | rt3 | Sleep   | 3770 |       
|                  |
| 48  | rt_user | localhost | rt3 | Sleep   | 3770 |       
|                  |
| 50  | rt_user | localhost | rt3 | Sleep   | 3757 |       
|                  |
| 51  | rt_user | localhost | rt3 | Sleep   | 3757 |       
|                  |
| 53  | rt_user | localhost | rt3 | Sleep   | 3754 |       
|                  |
| 54  | rt_user | localhost | rt3 | Sleep   | 3753 |       
|                  |
| 56  | rt_user | localhost | rt3 | Sleep   | 3751 |       
|                  |
| 57  | rt_user | localhost | rt3 | Sleep   | 3751 |       
|                  |
| 59  | rt_user | localhost | rt3 | Sleep   | 3743 |       
|                  |
| 60  | rt_user | localhost | rt3 | Sleep   | 3743 |       
|                  |
| 61  | rt_user | localhost | rt3 | Sleep   | 3739 |       
|                  |
| 62  | rt_user | localhost | rt3 | Sleep   | 3739 |       
|                  |
| 64  | rt_user | localhost | rt3 | Sleep   | 3737 |       
|                  |
| 65  | rt_user | localhost | rt3 | Sleep   | 3736 |       
|                  |
| 67  | rt_user | localhost | rt3 | Sleep   | 3735 |       
|                  |
| 68  | rt_user | localhost | rt3 | Sleep   | 3735 |       
|                  |
| 70  | rt_user | localhost | rt3 | Sleep   | 3732 |       
|                  |
| 71  | rt_user | localhost | rt3 | Sleep   | 3732 |       
|                  |
| 72  | rt_user | localhost | rt3 | Sleep   | 3729 |       
|                  |
| 73  | rt_user | localhost | rt3 | Sleep   | 3729 |       
|                  |
| 75  | rt_user | localhost | rt3 | Sleep   | 3727 |       
|                  |
| 76  | rt_user | localhost | rt3 | Sleep   | 3727 |       
|                  |
| 78  | rt_user | localhost | rt3 | Sleep   | 3724 |       
|                  |
| 79  | rt_user | localhost | rt3 | Sleep   | 3724 |       
|                  |
| 80  | rt_user | localhost | rt3 | Sleep   | 3718 |       
|                  |
| 81  | rt_user | localhost | rt3 | Sleep   | 3718 |       
|                  |
| 82  | rt_user | localhost | rt3 | Sleep   | 1843 |       
|                  |
| 83  | rt_user | localhost | rt3 | Sleep   | 1843 |       
|                  |
| 85  | rt_user | localhost | rt3 | Sleep   | 1835 |       
|                  |
| 86  | rt_user | localhost | rt3 | Sleep   | 1834 |       
|                  |
| 87  | rt_user | localhost | rt3 | Sleep   | 1830 |       
|                  |
| 88  | rt_user | localhost | rt3 | Sleep   | 1829 |       
|                  |
| 89  | rt_user | localhost | rt3 | Sleep   | 1782 |       
|                  |
| 90  | rt_user | localhost | rt3 | Sleep   | 1782 |       
|                  |
| 92  | rt_user | localhost | rt3 | Sleep   | 1777 |       
|                  |
| 93  | rt_user | localhost | rt3 | Sleep   | 1777 |       
|                  |
| 95  | rt_user | localhost | rt3 | Sleep   | 1579 |       
|                  |
| 96  | rt_user | localhost | rt3 | Sleep   | 1578 |       
|                  |
| 98  | rt_user | localhost | rt3 | Sleep   | 1575 |       
|                  |
| 99  | rt_user | localhost | rt3 | Sleep   | 1575 |       
|                  |
| 100 | rt_user | localhost | rt3 | Sleep   | 1570 |       
|                  |
| 101 | rt_user | localhost | rt3 | Sleep   | 1570 |       
|                  |
| 102 | rt_user | localhost | rt3 | Sleep   | 1548 |       
|                  |
| 103 | rt_user | localhost | rt3 | Sleep   | 1548 |       
|                  |
| 105 | rt_user | localhost | rt3 | Sleep   | 1542 |       
|                  |
| 106 | rt_user | localhost | rt3 | Sleep   | 1542 |       
|                  |
| 107 | rt_user | localhost | rt3 | Sleep   | 1538 |       
|                  |
| 108 | rt_user | localhost | rt3 | Sleep   | 1538 |       
|                  |
| 109 | rt_user | localhost | rt3 | Sleep   | 1511 |       
|                  |
| 110 | rt_user | localhost | rt3 | Sleep   | 1511 |       
|                  |
| 112 | rt_user | localhost | rt3 | Sleep   | 1509 |       
|                  |
| 113 | rt_user | localhost | rt3 | Sleep   | 1509 |       
|                  |
| 114 | rt_user | localhost | rt3 | Sleep   | 1507 |       
|                  |
| 115 | rt_user | localhost | rt3 | Sleep   | 1507 |       
|                  |
| 117 | rt_user | localhost | rt3 | Sleep   | 1486 |       
|                  |
| 118 | rt_user | localhost | rt3 | Sleep   | 1486 |       
|                  |
| 120 | rt_user | localhost | rt3 | Sleep   | 1464 |       
|                  |
| 121 | rt_user | localhost | rt3 | Sleep   | 1464 |       
|                  |
| 122 | rt_user | localhost | rt3 | Sleep   | 1458 |       
|                  |
| 123 | rt_user | localhost | rt3 | Sleep   | 1457 |       
|                  |
| 125 | rt_user | localhost | rt3 | Sleep   | 1455 |       
|                  |
| 126 | rt_user | localhost | rt3 | Sleep   | 1455 |       
|                  |
| 128 | rt_user | localhost | rt3 | Sleep   | 1453 |       
|                  |
| 129 | rt_user | localhost | rt3 | Sleep   | 1453 |       
|                  |
| 131 | rt_user | localhost | rt3 | Sleep   | 1451 |       
|                  |
| 132 | rt_user | localhost | rt3 | Sleep   | 1451 |       
|                  |
| 134 | rt_user | localhost | rt3 | Sleep   | 1448 |       
|                  |
| 135 | rt_user | localhost | rt3 | Sleep   | 1448 |       
|                  |
| 136 | rt_user | localhost | rt3 | Sleep   | 1409 |       
|                  |
| 137 | rt_user | localhost | rt3 | Sleep   | 1409 |       
|                  |
| 138 | rt_user | localhost | rt3 | Sleep   | 1298 |       
|                  |
| 139 | rt_user | localhost | rt3 | Sleep   | 1298 |       
|                  |
| 141 | rt_user | localhost | rt3 | Sleep   | 1295 |       
|                  |
| 142 | rt_user | localhost | rt3 | Sleep   | 1295 |       
|                  |
| 143 | rt_user | localhost | rt3 | Sleep   | 628  |       
|                  |
| 144 | rt_user | localhost | rt3 | Sleep   | 627  |       
|                  |
| 145 | rt_user | localhost | rt3 | Sleep   | 416  |       
|                  |
| 146 | rt_user | localhost | rt3 | Sleep   | 416  |       
|                  |
| 148 | rt_user | localhost | rt3 | Sleep   | 408  |       
|                  |
| 149 | rt_user | localhost | rt3 | Sleep   | 408  |       
|                  |
| 151 | rt_user | localhost | rt3 | Sleep   | 404  |       
|                  |
| 152 | rt_user | localhost | rt3 | Sleep   | 404  |       
|                  |
| 153 | rt_user | localhost | rt3 | Sleep   | 402  |       
|                  |
| 154 | rt_user | localhost | rt3 | Sleep   | 402  |       
|                  |
| 155 | rt_user | localhost | rt3 | Sleep   | 389  |       
|                  |
| 161 | root    | localhost |     | Query   | 0    |       | show 
processlist |
+-----+---------+-----------+-----+---------+------+-------+------------------+





More information about the Rt-devel mailing list