Ok. I didn't write these scripts, as they were in place when I arrived at this position, however from looking through them, it appears the actual connection to MySQL happens with something like: my $dbh = connect("DBI:mysql:database:localhost", "user", "password"); The above is a perl line. So you are saying that the script should just open() /tmp/mysql.sock and read and write to it like any other file? And, if I am following, replacing the above "localhost" with the actual hostname of the machine would create a TCP/IP socket/connection to the server, which is the same as if I had to connect remotely? The above perl line is called from local scripts, executing from the perl interpreter via cron, and also in mod_perl scripts, running from Apache. These are essentially the same, correct? Thank you Hans Zaunere [EMAIL PROTECTED] Gerald Clark wrote: > These scripts should not be creating their own sockets. > The should be connecting to the one socket that the mysql server creates. > > Hans Zaunere wrote: > > > We have had a MySQL/Apache/Perl combo running fairly smoothly. However > > the other day MySQL seemingly went crazy, and brought the rest of the > > system down; no sockets were available, even to ssh into. After a few > > minutes, enough sockets were available to ssh into, however MySQL seemed > > to far gone, and had to be restarted. I have a feeling it is due to the > > scripts we are running (mod_perl via apache and regular perl, via local > > cronjobs) and the way they are written. > > > > All the scripts connect to MySQL via local UNIX domain sockets, thus > > creating a /tmp/mysql.sock for each invocation. Is this the best way to > > do it, or should TCP/IP sockets be used, by connecting to the full > > hostname, versus connecting to localhost, which seems to use local > > sockets. I know the local sockets are generally considered faster, > > however I have also heard that the Linux kernel does not handle a lot of > > local sockets well. Would a combination of local and IP sockets be > > used, or strictly IP, since strictly local sockets seems to bring the > > system to the edge. > > > > As much information, links, comparasions, benchmarks, data on the > > subject would be greatly appreciated. Don't hesitate to contact me for > > additional questions/info. > > > > Thank you, > > > > Hans Zaunere > > [EMAIL PROTECTED] > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > --------------------------------------------------------------------- > > Before posting, please check: > > http://www.mysql.com/manual.php (the manual) > > http://lists.mysql.com/ (the list archive) > > > > To request this thread, e-mail <[EMAIL PROTECTED]> > > To unsubscribe, e-mail ><[EMAIL PROTECTED]> > > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > attachment.txt > > > > Content-Type: > > > > text/plain > > -- > Gerald L. Clark > [EMAIL PROTECTED]
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php