Re: Too many connections (again) (could Mark answer this please)

2001-11-27 Thread Mark Matthews

I've answered this twice, both in personal e-mails, but I'll answer it
again, one last time :).



Three things, First, you're using an old version of the driver. Please
upgrade to the latest (you should do this when you suspect it might be the
driver. Always check http://mmmysql.sourceforge.net/ as this is
_the_only_official_ MM.MySQL download site. I can't vouch for anything you
download from somewhere else).



Second, you are not closing your connections in finally{} blocks, so you can
not guarantee that they are being closed! Many browsers terminate the
connection to the servlet/JSP early (IE for example), which can cause code
you think should be executing not to execute. You should _always_ get rid of
expensive resources in a finally{} block to make sure that it actually
happens.



Third, please subscribe to the [EMAIL PROTECTED] This forum is not the
correct place to ask these types of questions, and I only get it in digest
mode, so it takes me a while to read/get back to people who ask JDBC
questions in the mysql list.



-Mark



- Original Message -

Message-ID: 000701c17707$7d6a7610$7300a8c0@yilmaz

From: yilmaz [EMAIL PROTECTED]

To: [EMAIL PROTECTED]

Subject: Re: Too many connections (again) (could Mark answer this please)

Date: Tue, 27 Nov 2001 13:50:59 +0800

MIME-Version: 1.0

Content-Type: text/plain;

charset=iso-8859-1

Content-Transfer-Encoding: 7bit

Me , too, have the same problem.

it seems that every opened page establishes a connection but

those connections can't be closed, although i explicitly close in my code

I posted a message related with this problem a few days ago,

unfortunately couldn't get a satisfying answer. So, i request from Mark

Matthew

to help us with this problem , since he is the author of Mysql.

(my Mysql version is 3.23 , i use jdbc through tomcat 4 b7, on win 2000.)

Thanks in advance

cheers



-
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




Re: Too many connections (again) (could Mark answer this please)

2001-11-27 Thread yilmaz

thanks a lot Mark,
now i figured it out, i should have used finally {} statements around
close() functions.
Best regards :)
- Original Message -
From: Mark Matthews [EMAIL PROTECTED]
To: yilmaz [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 27, 2001 10:07 PM
Subject: Re: Too many connections (again) (could Mark answer this please)


 I've answered this twice, both in personal e-mails, but I'll answer it
 again, one last time :).



 Three things, First, you're using an old version of the driver. Please
 upgrade to the latest (you should do this when you suspect it might be the
 driver. Always check http://mmmysql.sourceforge.net/ as this is
 _the_only_official_ MM.MySQL download site. I can't vouch for anything you
 download from somewhere else).



 Second, you are not closing your connections in finally{} blocks, so you
can
 not guarantee that they are being closed! Many browsers terminate the
 connection to the servlet/JSP early (IE for example), which can cause code
 you think should be executing not to execute. You should _always_ get rid
of
 expensive resources in a finally{} block to make sure that it actually
 happens.



 Third, please subscribe to the [EMAIL PROTECTED] This forum is not the
 correct place to ask these types of questions, and I only get it in digest
 mode, so it takes me a while to read/get back to people who ask JDBC
 questions in the mysql list.



 -Mark



 - Original Message -

 Message-ID: 000701c17707$7d6a7610$7300a8c0@yilmaz

 From: yilmaz [EMAIL PROTECTED]

 To: [EMAIL PROTECTED]

 Subject: Re: Too many connections (again) (could Mark answer this please)

 Date: Tue, 27 Nov 2001 13:50:59 +0800

 MIME-Version: 1.0

 Content-Type: text/plain;

 charset=iso-8859-1

 Content-Transfer-Encoding: 7bit

 Me , too, have the same problem.

 it seems that every opened page establishes a connection but

 those connections can't be closed, although i explicitly close in my code

 I posted a message related with this problem a few days ago,

 unfortunately couldn't get a satisfying answer. So, i request from Mark

 Matthew

 to help us with this problem , since he is the author of Mysql.

 (my Mysql version is 3.23 , i use jdbc through tomcat 4 b7, on win 2000.)

 Thanks in advance

 cheers





-
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




Re: Too many connections (again) (could Mark answer this please)

2001-11-26 Thread yilmaz

Me , too, have the same problem.
it seems that every opened page establishes a connection but
those connections can't be closed, although i explicitly close in my code
I posted a message related with this problem a few days ago,
unfortunately couldn't get a satisfying  answer. So, i request from Mark
Matthew
to help us with this problem , since he is the author of Mysql.
(my Mysql version is 3.23 , i use jdbc through tomcat 4 b7, on win 2000.)
Thanks in advance
cheers
- Original Message -
From: sherzodR [EMAIL PROTECTED]
To: Chris Mason [EMAIL PROTECTED]
Cc: MySQL List [EMAIL PROTECTED]
Sent: Tuesday, November 27, 2001 1:19 PM
Subject: Re: Too many connections (again)




 I keep getting that error too. But I couldn't figure out the cause. So I
 just used Apache::DBI for persistent DB connection ( you can't do that
 unless your scripts are running under mod_perl )

 --
 sherzodR


 On Mon, 26 Nov 2001, Chris Mason wrote:

 I have a lot of databased websites running on my server (1 Ghz P3/256
 MB/20GB/RH7.1) and I am continually getting connection problems. None of
the
 sites are high volume, so I am surprised by this and I suspect that
 connections are not being reused quickly enough.
 
 Here's my config, can anyone help me sort this out?
 
 
 
 [root@server1 /root]# vi /etc/my.cnf
 
 [mysqld]
 #datadir=/var/lib/mysql
 datadir=/usr/mysql
 #socket=/usr/mysql/mysql.sock
 socket=/var/lib/mysql/mysql.sock
 
 [mysql.server]
 user=mysql
 basedir=/var/lib
 max_connections=300
 
 [safe_mysqld]
 err-log=/var/log/mysqld.log
 pid-file=/var/run/mysqld/mysqld.pid
 
 
 Chris Mason
 [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
 


 -
 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





-
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