List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:July 19 1999 4:23pm
Subject:Re: Aborted connection ... to db
View as plain text  
Max Chernykh wrote:
> 
> >> Hi,
> >> Sorry for my English, but I hope you understand me...
> >>
> >> I have a scripts, which use :
> >> -------------------------------------------------------------------
> >> #!/usr/bin/perl
> >>
> >> use DBD::mysql;
> >> $host="";
> >> $database="DBI:mysql:zavalinka";
> >>
> >> $dbh = DBI->connect($database,"wwwsrv","") ||
> >>         print "cannot connect to mysql at $host:$database\n";
> >>
> >> $time = time-30;
> >> $dbh->do("delete from contact where atime<$time");
> >>
> >> $time = time-86400;
> >> $dbh->do("delete from blacklist where atime<$time");
> >>
> >> $dbh->disconnect;
> >> --------------------------------------------------------------------
> >>
> >> Script work some time and there is time when it will break... I don't know
> >> why...
> >>
> >> Mysql start write to log:
> >> 990613  0:55:11  Aborted connection 26274 to db: 'zavalinka' user: 'wwwsrv'
> >>
> >> And script start write to con:
> >>
> --------------------------------------------------------------------------------
> >> Can't connect to local MySQL server through socket '/tmp/mysql.sock'
> >> (2) at /www /zavalinka/scripts/contact.pl line 7
> >> Can't call method "do" without a package or object reference at
> >> /www/zavalinka/scripts/talk.pl line 11.
> >>
> --------------------------------------------------------------------------------
> >>
> >> Where is problem?
> >> Help me.
> >>
> >> Thanks.
> >>
> >> Max Chernykh
> >> mailto:
> 
> > Max, your English is good enough...
> 
> Tnx.
> 
> > Looks like somehow your Unix socket dies once in a while. How often does
> > this happen? Can you replicate the problem - put your server under
> > certain conditions that will cause the error?
> 
> > What OS are you running and what version of MySQL? Can you re-post with
> > mysqlbug?
> 
> TCX Datakonsult AB, by Monty
> 
> Server version          3.22.25
> Protocol version        10
> Connection              Localhost via UNIX socket
> UNIX socket             /usr/local/mysql/tmp/mysql.sock
> Uptime:                 1 day 4 hours 44 min 42 sec
> 
> Threads: 1  Questions: 24877  Slow queries: 0  Opens: 21  Flush tables: 1  Open
> tables: 17
> System: FreeBSD lilo.icc.ru 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Tue Apr 22
> 11:21:11 IRKST 1997     root@stripped:/usr/src/sys/compile/LILO  i386
> 
> Some paths:  /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc
> /usr/bin/cc
> GCC: gcc version 2.7.2.1
> Compilation info: CC='gcc'  CFLAGS=''  CXX='gcc'  CXXFLAGS=''  LDFLAGS=''
> Configure command: ./configure  --with-unix-socket-path=/var/tmp/mysql.sock
> --with-low-memory --with-mit-threads=yes
> Perl: This is perl, version 5.005_03 built for i386-freebsd
> 
> > If flaky Unix sockets is the problem what Ritchie suggests will work -
> > force  TCP/IP by saying $database =
> > "dbi:mysql:host=".`hostname`.";database=zavalinka"; but you will see a
> > performance drop. Of course it is better to have a program that works
> > slowly than the one that crashes fast :-), but the best solution is the
> > one that works and does it fast.
> 
> I try some version in "Configure command" with threads... And I get
> subj after some time. Why? May be out of memory, but why mysql don't
> write it... I look only break thread.
> 
> I tried TCP/IP, socks.... :) hui... some time and get "aborted
> connection..."
> 
> Who can help me...
> 
> Max.
> Thanks

Max:

It seems like your client and your server do not agree on the location
of the Unix socket.

 You should still be able to use TCP/IP just fine, but the best thing to
do would be to install the binary distribution

-- 
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
Thread
Re: Aborted connection ... to dbMax Chernykh19 Jul
Re: Aborted connection ... to dbSasha Pachev19 Jul