Problem with AST_VDadapt.pl

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Problem with AST_VDadapt.pl

Postby SuPrSluG » Tue Sep 05, 2006 12:01 am

When I'm in vicidial or astguiclient admin after a while I get :
Warning: mysql_connect() [function.mysql-connect]: Too many connections in /var/www/astguiclient/dbconnect.php on line 38

so I do a ps aux and see
cron 817 0.0 0.2 3836 1092 ? Ss Sep04 0:00 /usr/bin/SCREEN -d -m -S ASTupdate /usr/share/astguiclient/AST_update.pl
cron 819 0.0 1.1 9760 6156 pts/6 Ss+ Sep04 0:00 /usr/bin/perl /usr/share/astguiclient/AST_update.pl
root 892 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 893 0.0 1.0 8968 5308 ? Ss Sep04 0:07 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl
root 1001 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 1002 0.0 1.0 8980 5312 ? Ss Sep04 0:08 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl
root 1106 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 1107 0.0 1.0 8968 5300 ? Ss Sep04 0:08 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl
root 1241 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 1242 0.0 1.0 8972 5300 ? Ss Sep04 0:08 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl
root 1350 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 1351 0.0 1.0 8968 5292 ? Ss Sep04 0:08 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl
root 1450 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 1451 0.0 1.0 8972 5296 ? Ss Sep04 0:07 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl
root 1562 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 1563 0.0 1.0 8904 5276 ? Ss Sep04 0:08 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl
root 1684 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 1685 0.0 1.0 8912 5280 ? Ss Sep04 0:08 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl
root 1781 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 1782 0.0 1.0 8916 5288 ? Ss Sep04 0:08 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl
root 1851 0.0 0.1 2456 860 ? S Sep04 0:00 /USR/SBIN/CRON
cron 1852 0.0 1.0 8912 5284 ? Ss Sep04 0:08 /usr/bin/perl /usr/share/astguiclient/AST_AST_VDadapt.plVDadapt.pl
root 1919 0.0 0.1 2456 86

and on and on for about 60 lines. Why is it spawning so many instances of AST_VDadapt.pl?
SuPrSluG
 
Posts: 71
Joined: Thu Aug 24, 2006 8:01 pm

Postby SuPrSluG » Tue Sep 05, 2006 12:03 am

sorry I'm trying the new 2.0 beta
SuPrSluG
 
Posts: 71
Joined: Thu Aug 24, 2006 8:01 pm

Postby mflorell » Tue Sep 05, 2006 12:28 am

What Linux distro are you using?

Have you tried "show full processlist" in mysql to see what connections are active?

Your ps output looks a little strange can you post results of "ps --info"?
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby SuPrSluG » Tue Sep 05, 2006 8:05 am

i'm using ubuntu server.

~$ screen -r
There are several suitable screens on:
4064.ASTVDremote (Detached)
4060.ASTupdate (Detached)
4055.ASTVDauto (Detached)
4050.ASTsend (Detached)
4044.ASTlisten (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.


this after about 5-10 min.
mysql> show full processlist;
+-----+------+-----------+----------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+----------+---------+------+-------+-----------------------+
| 8 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 12 | cron | localhost | asterisk | Sleep | 72 | NULL | NULL |
| 13 | cron | localhost | asterisk | Sleep | 0 | NULL | NULL |
| 14 | cron | localhost | asterisk | Sleep | 2 | NULL | NULL |
| 15 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 16 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 19 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 23 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 28 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 34 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 42 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 48 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 52 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 57 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 62 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 68 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 73 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 78 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 80 | cron | localhost | NULL | Query | 0 | NULL | show full processlist |
| 86 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 94 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 99 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 104 | cron | localhost | asterisk | Sleep | 0 | NULL | NULL |
+-----+------+-----------+----------+---------+------+-------+-----------------------+

cron@CallMaster:~$ ps --info
BSD j OL_j
BSD l OL_l
BSD s OL_s
BSD u OL_u
BSD v OL_v
SysV -f (none)
SysV -fl (none)
SysV -j (none)
SysV -l (none)

procps version 3.2.6
Linux version 2.6.15
Compiled with: glibc 2.3, gcc 4.0

header_gap=-1 lines_to_next_header=1
screen_cols=150 screen_rows=46

personality=0x00000000 (from "unknown")
EUID=1000 TTY=136,6 Hertz=100 page_size=4096
sizeof(proc_t)=516 sizeof(long)=4 sizeof(KLONG)=4
archdefs: i386
namelist_file="<no System.map file>"

any ideas
SuPrSluG
 
Posts: 71
Joined: Thu Aug 24, 2006 8:01 pm

Postby mflorell » Tue Sep 05, 2006 8:47 am

I am not very familiar with the server side of Ubuntu since the last time I tried to use it as a server I quit in frustration over how it was setup. Using Ubuntu as a workstation was great though.

I don't quite know why having 23 open DB connections would cause you to have "too many connection" errors. Did you compile MySQL from source?

As for the issue you are having with the AST_VDadapt script. can you run this and post output:
/usr/share/astguiclient/ADMIN_keepalive_AST_VDadapt.pl --debugX
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby SuPrSluG » Tue Sep 05, 2006 9:06 am

I am not very familiar with the server side of Ubuntu since the last time I tried to use it as a server I quit in frustration over how it was setup.

Ubuntu is standard debian setup. All distros seem
to place things in slightly different places. I've gotten used to debian and that's why I've used it.


Did you compile MySQL from source

No. I did not. Does it matter?

I don't quite know why having 23 open DB connections would cause you to have "too many connection"
I'm up to 403 and counting now eventually it will stop accepting connections. Why does the adapt script respawn and not kill previous instances?

400 | cron | localhost | asterisk | Sleep | 8 | NULL | NULL |
| 401 | cron | localhost | asterisk | Sleep | 1 | NULL | NULL |
| 403 | cron | localhost | NULL | Query | 0 | NULL | show full processlist |
+-----+------+-----------+----------+---------+------+-------+-----------------------+


184| 8780 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl|
VDAD RUNNING: |/usr/share/astguiclient/AST_VDadapt. errorspl|
185| 8847 /USR/SBIN/CRON|
186| 8848 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl|
VDAD RUNNING: |/usr/share/astguiclient/AST_VDadapt.pl|
187| 8915 /USR/SBIN/CRON|
188| 8916 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl|
VDAD RUNNING: |/usr/share/astguiclient/AST_VDadapt.pl|
189| 8983 /USR/SBIN/CRON|
190| 8984 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl|
VDAD RUNNING: |/usr/share/astguiclient/AST_VDadapt.pl|
191| 9078 /USR/SBIN/CRON|
192| 9079 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl|
VDAD RUNNING: |/usr/share/astguiclient/AST_VDadapt.pl|
193| 9147 /USR/SBIN/CRON|
194| 9148 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl|
VDAD RUNNING: |/usr/share/astguiclient/AST_VDadapt.pl|
195| 9215 /USR/SBIN/CRON|
196| 9216 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl|
VDAD RUNNING: |/usr/share/astguiclient/AST_VDadapt.pl|
197| 9286 /USR/SBIN/CRON|
198| 9287 /usr/bin/perl /usr/share/astguiclient/AST_manager_kill_hung_congested.pl|
199| 9288 /USR/SBIN/CRON|
200| 9289 /usr/bin/perl /usr/share/astguiclient/AST_VDadapt.pl|
VDAD RUNNING: |/usr/share/astguiclient/AST_VDadapt.pl|
201| 9326 /usr/bin/perl /usr/share/astguiclient/ADMIN_keepalive_AST_VDadapt.pl --debugX|
202| 9327 /bin/ps -o %p %a --no-headers -A|
DONE
SuPrSluG
 
Posts: 71
Joined: Thu Aug 24, 2006 8:01 pm

Postby mflorell » Tue Sep 05, 2006 9:13 am

I have no idea why it is spawning new AST_VDadapt.pl processes since from your output it looks like the keepalive script sees that it is running.

Do you have the AST_VDadapt.pl script itself in your crontab or the keepalive?
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby SuPrSluG » Tue Sep 05, 2006 9:25 am

Do you have the AST_VDadapt.pl script itself in your crontab or the keepalive?

Both. I followed the scratch install. Should I only have one?
SuPrSluG
 
Posts: 71
Joined: Thu Aug 24, 2006 8:01 pm

Postby mflorell » Tue Sep 05, 2006 9:27 am

Well, that explains your problem. take the AST_VDadapt.pl out of the crontab and leave the keepalive for it in there.

Originally the AST_VDadapt script was designed to run every minute, then I changed it to an always-run script.

Can you tell me where you saw that AST_VDadapt.pl should be in the crontab so that I can remove it?
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby SuPrSluG » Tue Sep 05, 2006 9:48 am

My mistake. Somehow I must have added an extra entry when I was having an issue getting screen going.
SuPrSluG
 
Posts: 71
Joined: Thu Aug 24, 2006 8:01 pm


Return to Support

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot], tantd and 140 guests