IIS, ASP, MySQL (was: database pooling problem)

2005-04-06 Thread Robert Citek
On Monday, Mar 7, 2005, at 16:04 US/Central, [EMAIL PROTECTED] wrote:
It would be happy to try to help if I worked in or on either of those
platforms (Apache + Java).  I am Win32(IIS), ASP (VBScript/JavaScript)
using MyODBC as my connection library.
Is using MyODBC the accepted way to connect to a MySQL database from 
within an ASP/VBScript page?  Or is there some other way?  For example, 
PHP has a connector that can directly connect to a MySQL database.

Regards,
- Robert
http://www.cwelug.org/downloads
Help others get OpenSource software.  Distribute FLOSS
for Windows, Linux, *BSD, and MacOS X with BitTorrent
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: IIS, ASP, MySQL (was: database pooling problem)

2005-04-06 Thread SGreen
Robert Citek [EMAIL PROTECTED] wrote on 04/06/2005 10:55:07 
AM:

 
 On Monday, Mar 7, 2005, at 16:04 US/Central, [EMAIL PROTECTED] wrote:
  It would be happy to try to help if I worked in or on either of those
  platforms (Apache + Java).  I am Win32(IIS), ASP (VBScript/JavaScript)
  using MyODBC as my connection library.
 
 Is using MyODBC the accepted way to connect to a MySQL database from 
 within an ASP/VBScript page?  Or is there some other way?  For example, 
 PHP has a connector that can directly connect to a MySQL database.
 
 Regards,
 - Robert
 http://www.cwelug.org/downloads
 Help others get OpenSource software.  Distribute FLOSS
 for Windows, Linux, *BSD, and MacOS X with BitTorrent
 


MyODBC is but one way to connect code to server. I am not running ASP.NET 
servers so I don't use the .NET Connector. There was another project or 
two (like the .Net Connector) that was written for VB.  I found a copy of 
the source of one of them but all of the projects I have found seem to be 
abandoned (which means, you are responsible for your own support). The C++ 
API is packaged with the server)

Since I don't have time to update these legacy connectors to keep up with 
the new server technology (Views, SPROCS, INFORMATION_SCHEMA, 4.1+ 
password hashing, etc) and I don't have enough time to debug it when I get 
it wrong (which everyone does), I decided to go with the tested and 
prepackaged MyODBC. 

Now, if anyone else has or knows of a product that will work from ASP (not 
ASP.Net) or VB (not VB.NET) and doesn't require the .NET runtime library 
to be installed I would love to hear from you. Please respond to the list 
so that everyone has a chance to get in on it, too.

Thanks,

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

PS. I am sure that if I tried really hard, I could call a compiled version 
of the C++ API from VB but I don't want to go through the motions of 
converting all of the APIs function calls into VB declare statements. I 
have thought about it, but decided against it. Once again, it's a matter 
of time and support. - S


Re: IIS, ASP, MySQL (was: database pooling problem)

2005-04-06 Thread Florin Andrei
On Wed, 2005-04-06 at 09:55 -0500, Robert Citek wrote:
 
 Is using MyODBC the accepted way to connect to a MySQL database from 
 within an ASP/VBScript page?  Or is there some other way?  For example, 
 PHP has a connector that can directly connect to a MySQL database.

I believe it's the only one currently maintained.

-- 
Florin Andrei

http://florin.myip.org/


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



database pooling problem

2005-03-07 Thread Scott Purcell
Hello,
 
I am working with a traditional database pooling class basically putting 
connection objects into a Vector.  When I run the code from a main, it appears 
solid. I have run 10s of thousands of back to back queries and all is good.
 
Problem is when I connect it to a web-app, and reboot the webserver a couple of 
times, I get a message from the driver stating Too many connection and I am 
done.
 
Upon thinking about this, I figured my traditional Vector of connections, is 
getting created over and over, each time someone bumps the web server with a 
new class, etc. So I start out with 10 connections, then another 10 and another 
10 and eventually I guess the driver has no more connections to give?
 
Anyway, this list is possibly the wrong, list, but I would hope there are some 
developers here that may lend a hand or link. So I am not happy with what I 
have created nor the way it works on the web server.
 
Does anyone have any ideas how I should handle this? in a web-based environment.
 
Thanks,
Scott
 
 
 
 


Re: database pooling problem

2005-03-07 Thread SGreen
Scott Purcell [EMAIL PROTECTED] wrote on 03/07/2005 04:29:18 PM:

 Hello,
 
 I am working with a traditional database pooling class basically 
 putting connection objects into a Vector.  When I run the code from 
 a main, it appears solid. I have run 10s of thousands of back to 
 back queries and all is good.
 
 Problem is when I connect it to a web-app, and reboot the webserver 
 a couple of times, I get a message from the driver stating Too many
 connection and I am done.
 
 Upon thinking about this, I figured my traditional Vector of 
 connections, is getting created over and over, each time someone 
 bumps the web server with a new class, etc. So I start out with 10
 connections, then another 10 and another 10 and eventually I guess 
 the driver has no more connections to give?
 
 Anyway, this list is possibly the wrong, list, but I would hope 
 there are some developers here that may lend a hand or link. So I am
 not happy with what I have created nor the way it works on the web 
server.
 
 Does anyone have any ideas how I should handle this? in a web-based 
 environment.
 
 Thanks,
 Scott
 
 

No matter which list you submit to, you need to provide more details. 
Technically what you are asking is a little off-topic (more about making a 
pool work with a web server than just making the connection, right?) But 
if you bring the question to the list, someone _may_ be able to pitch in 
and help.

Now exactly WHO can help (and to what degree they can help) completely 
depends on WHICH web server you use (there are dozens, you know...), HOW 
you initialize your pool (again many methods available), HOW you take and 
return connections from your pool (ditto), and which languages are in use 
in this entire process (again dozens of options). Just telling us that you 
use a web-server did not provide nearly enough information as there are 
literally thousands of combinations of ways to do what you described.

Please tell whichever list you submit to:
What OS you are using
Which web server you are using
What languages you are using

And you will need to supply some code examples, too. The list members will 
need to be able to see your code so that they can see what is wrong with 
it. 

Best of luck,
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

RE: database pooling problem

2005-03-07 Thread SGreen
Scott Purcell [EMAIL PROTECTED] wrote on 03/07/2005 04:59:27 PM:

 Thanks Sean,
 
 I am using standalone Apache/Tomcat 4.1.31
 
 mysql \s
 --
 mysql  Ver 12.21 Distrib 4.0.15, for Win95/Win98 (i32)
 
 Connection id:  184
 SSL:Not in use
 Server version: 4.0.15-max-debug
 Protocol version:   10
 Connection: localhost via TCP/IP
 Client characterset:latin1
 Server characterset:latin1
 TCP port:   3306
 --
 
 mysql
 
 I am using Java to code with and I am using a driver called: 
 org.gjt.mm.mysql.Driver
 
 
 My connection class is too large to submit to the list, or I would 
submit it.
 
 I guess what I would like to be able to do is create some type of 
 object that I could use to do pooling that is maybe inside the 
container?
 
 I hope this helps,
 Scott

It would be happy to try to help if I worked in or on either of those 
platforms (Apache + Java).  I am Win32(IIS), ASP (VBScript/JavaScript) 
using MyODBC as my connection library. Sorry but I can't help in any way 
shape or form. I have CC-ed the description of your operating and 
development environments to the list to see if anyone offers to help.

Maybe next time!

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine










 
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 07, 2005 3:48 PM
 To: Scott Purcell
 Cc: mysql@lists.mysql.com
 Subject: Re: database pooling problem

 
 
 Scott Purcell [EMAIL PROTECTED] wrote on 03/07/2005 04:29:18 
PM:
 
  Hello,
  
  I am working with a traditional database pooling class basically 
  putting connection objects into a Vector.  When I run the code from 
  a main, it appears solid. I have run 10s of thousands of back to 
  back queries and all is good.
  
  Problem is when I connect it to a web-app, and reboot the webserver 
  a couple of times, I get a message from the driver stating Too many
  connection and I am done.
  
  Upon thinking about this, I figured my traditional Vector of 
  connections, is getting created over and over, each time someone 
  bumps the web server with a new class, etc. So I start out with 10
  connections, then another 10 and another 10 and eventually I guess 
  the driver has no more connections to give?
  
  Anyway, this list is possibly the wrong, list, but I would hope 
  there are some developers here that may lend a hand or link. So I am
  not happy with what I have created nor the way it works on the web 
server.
  
  Does anyone have any ideas how I should handle this? in a web-based 
  environment.
  
  Thanks,
  Scott
  
  
 
 No matter which list you submit to, you need to provide more 
 details. Technically what you are asking is a little off-topic (more
 about making a pool work with a web server than just making the 
 connection, right?) But if you bring the question to the list, 
 someone _may_ be able to pitch in and help. 
 
 Now exactly WHO can help (and to what degree they can help) 
 completely depends on WHICH web server you use (there are dozens, 
 you know...), HOW you initialize your pool (again many methods 
 available), HOW you take and return connections from your pool 
 (ditto), and which languages are in use in this entire process 
 (again dozens of options). Just telling us that you use a web-server
 did not provide nearly enough information as there are literally 
 thousands of combinations of ways to do what you described. 
 
 Please tell whichever list you submit to: 
 What OS you are using 
 Which web server you are using 
 What languages you are using 
 
 And you will need to supply some code examples, too. The list 
 members will need to be able to see your code so that they can see 
 what is wrong with it. 
 
 Best of luck, 
 Shawn Green
 Database Administrator
 Unimin Corporation - Spruce Pine

Re: database pooling problem

2005-03-07 Thread Eric Bergen
Apache 1.3 with php (not sure about tomcat) is a pre forked daemon.
Any connection pooling numbers will be per child. Try setting your
connection numbers per child (for most php apps this is 1) and let us
know what happens. I'm guessing it will create as many connections as
there are apache children. For more info see the fork() man page.

-Eric

On Mon, 7 Mar 2005 17:04:47 -0500, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Scott Purcell [EMAIL PROTECTED] wrote on 03/07/2005 04:59:27 PM:
 
  Thanks Sean,
 
  I am using standalone Apache/Tomcat 4.1.31
 
  mysql \s
  --
  mysql  Ver 12.21 Distrib 4.0.15, for Win95/Win98 (i32)
 
  Connection id:  184
  SSL:Not in use
  Server version: 4.0.15-max-debug
  Protocol version:   10
  Connection: localhost via TCP/IP
  Client characterset:latin1
  Server characterset:latin1
  TCP port:   3306
  --
 
  mysql
 
  I am using Java to code with and I am using a driver called:
  org.gjt.mm.mysql.Driver
 
 
  My connection class is too large to submit to the list, or I would
 submit it.
 
  I guess what I would like to be able to do is create some type of
  object that I could use to do pooling that is maybe inside the
 container?
 
  I hope this helps,
  Scott
 
 It would be happy to try to help if I worked in or on either of those
 platforms (Apache + Java).  I am Win32(IIS), ASP (VBScript/JavaScript)
 using MyODBC as my connection library. Sorry but I can't help in any way
 shape or form. I have CC-ed the description of your operating and
 development environments to the list to see if anyone offers to help.
 
 Maybe next time!
 
 Shawn Green
 Database Administrator
 Unimin Corporation - Spruce Pine
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 07, 2005 3:48 PM
  To: Scott Purcell
  Cc: mysql@lists.mysql.com
  Subject: Re: database pooling problem
 
 
 
  Scott Purcell [EMAIL PROTECTED] wrote on 03/07/2005 04:29:18
 PM:
 
   Hello,
  
   I am working with a traditional database pooling class basically
   putting connection objects into a Vector.  When I run the code from
   a main, it appears solid. I have run 10s of thousands of back to
   back queries and all is good.
  
   Problem is when I connect it to a web-app, and reboot the webserver
   a couple of times, I get a message from the driver stating Too many
   connection and I am done.
  
   Upon thinking about this, I figured my traditional Vector of
   connections, is getting created over and over, each time someone
   bumps the web server with a new class, etc. So I start out with 10
   connections, then another 10 and another 10 and eventually I guess
   the driver has no more connections to give?
  
   Anyway, this list is possibly the wrong, list, but I would hope
   there are some developers here that may lend a hand or link. So I am
   not happy with what I have created nor the way it works on the web
 server.
  
   Does anyone have any ideas how I should handle this? in a web-based
   environment.
  
   Thanks,
   Scott
  
  
 
  No matter which list you submit to, you need to provide more
  details. Technically what you are asking is a little off-topic (more
  about making a pool work with a web server than just making the
  connection, right?) But if you bring the question to the list,
  someone _may_ be able to pitch in and help.
 
  Now exactly WHO can help (and to what degree they can help)
  completely depends on WHICH web server you use (there are dozens,
  you know...), HOW you initialize your pool (again many methods
  available), HOW you take and return connections from your pool
  (ditto), and which languages are in use in this entire process
  (again dozens of options). Just telling us that you use a web-server
  did not provide nearly enough information as there are literally
  thousands of combinations of ways to do what you described.
 
  Please tell whichever list you submit to:
  What OS you are using
  Which web server you are using
  What languages you are using
 
  And you will need to supply some code examples, too. The list
  members will need to be able to see your code so that they can see
  what is wrong with it.
 
  Best of luck,
  Shawn Green
  Database Administrator
  Unimin Corporation - Spruce Pine
 


-- 
Eric Bergen
[EMAIL PROTECTED]
http://www.ebergen.net

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: database pooling problem

2005-03-07 Thread William R. Mussatto
Eric Bergen said:
 Apache 1.3 with php (not sure about tomcat) is a pre forked daemon. Any
 connection pooling numbers will be per child. Try setting your
 connection numbers per child (for most php apps this is 1) and let us
 know what happens. I'm guessing it will create as many connections as
 there are apache children. For more info see the fork() man page.

 -Eric
Actually the connection is on per worker process.  Tomcat response to
apache's children's requests, so it would be, at worst, one connnection
per tomcat worker, which should be a smaller number than apache
children/threads.  There are methods for tomcat workers to also share a
connection pool, but I've never used them.  For my needs dropping and
creating connections has been better (shared servers).

I'd look at the tomcat connection pooling information on the apache site
as a place to start rather than the web-sever.  Hopefully you have
configured tomcat to just handle the .jsp page not ALL PAGES.
 On Mon, 7 Mar 2005 17:04:47 -0500, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:
 Scott Purcell [EMAIL PROTECTED] wrote on 03/07/2005 04:59:27
 PM:

  Thanks Sean,
 
  I am using standalone Apache/Tomcat 4.1.31
 
  mysql \s
  --
  mysql  Ver 12.21 Distrib 4.0.15, for Win95/Win98 (i32)
 
  Connection id:  184
  SSL:Not in use
  Server version: 4.0.15-max-debug
  Protocol version:   10
  Connection: localhost via TCP/IP
  Client characterset:latin1
  Server characterset:latin1
  TCP port:   3306
  --
 
  mysql
 
  I am using Java to code with and I am using a driver called:
  org.gjt.mm.mysql.Driver
 
 
  My connection class is too large to submit to the list, or I would
 submit it.
 
  I guess what I would like to be able to do is create some type of
 object that I could use to do pooling that is maybe inside the
 container?
 
  I hope this helps,
  Scott

 It would be happy to try to help if I worked in or on either of those
 platforms (Apache + Java).  I am Win32(IIS), ASP (VBScript/JavaScript)
 using MyODBC as my connection library. Sorry but I can't help in any
 way shape or form. I have CC-ed the description of your operating and
 development environments to the list to see if anyone offers to help.

 Maybe next time!

 Shawn Green
 Database Administrator
 Unimin Corporation - Spruce Pine

 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 07, 2005 3:48 PM
  To: Scott Purcell
  Cc: mysql@lists.mysql.com
  Subject: Re: database pooling problem

 
 
  Scott Purcell [EMAIL PROTECTED] wrote on 03/07/2005
 04:29:18
 PM:
 
   Hello,
  
   I am working with a traditional database pooling class basically
 putting connection objects into a Vector.  When I run the code
 from a main, it appears solid. I have run 10s of thousands of back
 to back queries and all is good.
  
   Problem is when I connect it to a web-app, and reboot the
 webserver a couple of times, I get a message from the driver
 stating Too many connection and I am done.
  
   Upon thinking about this, I figured my traditional Vector of
 connections, is getting created over and over, each time someone
 bumps the web server with a new class, etc. So I start out with
 10 connections, then another 10 and another 10 and eventually I
 guess the driver has no more connections to give?
  
   Anyway, this list is possibly the wrong, list, but I would hope
 there are some developers here that may lend a hand or link. So I
 am not happy with what I have created nor the way it works on the
 web
 server.
  
   Does anyone have any ideas how I should handle this? in a
 web-based environment.
  
   Thanks,
   Scott
  
  
 
  No matter which list you submit to, you need to provide more
  details. Technically what you are asking is a little off-topic (more
 about making a pool work with a web server than just making the
 connection, right?) But if you bring the question to the list,
 someone _may_ be able to pitch in and help.
 
  Now exactly WHO can help (and to what degree they can help)
  completely depends on WHICH web server you use (there are dozens,
 you know...), HOW you initialize your pool (again many methods
 available), HOW you take and return connections from your pool
 (ditto), and which languages are in use in this entire process
 (again dozens of options). Just telling us that you use a web-server
 did not provide nearly enough information as there are literally
 thousands of combinations of ways to do what you described.
 
  Please tell whichever list you submit to:
  What OS you are using
  Which web server you are using
  What languages you are using
 
  And you will need to supply some code examples, too. The list
  members will need to be able to see your code so that they can see
 what is wrong with it.
 
  Best of luck,
  Shawn Green
  Database Administrator
  Unimin Corporation - Spruce Pine



 --
 Eric