Too many connections error with mySQL

Results 1 to 2 of 2

Thread: Too many connections error with mySQL

  1. #1
    Join Date
    Dec 1969

    Default Too many connections error with mySQL

    Ok, this may be a silly question, but I&#039;ll ask anyway:<BR><BR>Looking at the error logs on my site (I use asp and MySQL) I am getting this error sometimes:<BR><BR>/iframe/desktops2.asp?&#124 8&#124 80004005&#124[TCX][MyODBC]Too_many_connections<BR><BR>I set my connection string in a file called c.asp, which contains this:<BR><BR>Dim oConn<BR>set oConn = Server.CreateObject("ADODB.Connection")<BR>oConn.O pen "DSN=the_db; UID=the_id; PWD=the_pwd;"<BR><BR>And on each page in my site which needs to connect to the db I have this include line at the top:<BR><BR>&#060;!--#INCLUDE file="../inc/c.asp" --&#062;<BR><BR>Does it matter that every page uses the same connection string - could this be why I am getting the Too Many Connections error?<BR><BR>Would it be better, from a database point of view, to have a uniquely named connection string for each separate asp page connecting to the database, or is that not the problem, is the problem just that too many pages are connecting to the database, regardless of the name of the connection string?<BR><BR>I have made sure that wherever I connect, I also close the connection afterwards, so I&#039;m not leaving a trail of open connections littering the site.<BR><BR>I have also checked the mySQL documentation, which says it should be able to cope with about 100 concurrent connections.<BR><BR>The log says in the last 7 days there were 131168 Successful Server requests, or 2431 Requests for pages in the last 7 days. That doesn&#039;t seem a lot to me...<BR><BR>Thanks<BR><BR>Jim

  2. #2
    Join Date
    Dec 1969

    Default So where do you CLOSE...

    ...the connection??? That error usually comes from leaving connections open when a page exits. (Shoudn&#039;t be happening, anyway, but probably your MyODBC driver is out of date.)<BR><BR>No, the VBScript name of the connection string has zero importance in all this. How does the database have any idea what that name is???<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts