[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-odbc
Subject:    random dropped connections via odbc from asp web page
From:       John Pearson <John.Pearson () osc ! com>
Date:       1999-05-20 16:32:17
[Download RAW message or body]

I am using the following snippet from a web page to access mysql:

------------
	DIM	StrName
	DIM StrPassword
	DIM QueryString
	DIM Found
	
	Found = FALSE
	StrName = Request.Form("LogonName")
	StrPass = Request.Form("password1")
		
	SET Session("WebData") = Server.CreateObject("ADODB.Connection")
	SET WDConn = Session("WebData")
	WDConn.Open( "WebData" )
	QueryString = "SELECT * FROM Cust_Logon WHERE LogonName='" &
StrName & "' AND Password='" & StrPassword & "'"
	
	SET WDRecs = WDConn.Execute( QueryString )
	Do While( Found = FALSE )
		if(WDRecs.Fields.Item("LogonName") = StrName) AND
(WDrecs.Fields.Item("Password") = StrPassword) Then
			Found = TRUE
		else
			WDRecs.MoveNext()
		end if
	Loop
	if( Found = TRUE ) Then
		Session.Contents("IP") =
Request.ServerVariables("REMOTE_ADDR")
		Session.Contents("CustID") =
WDRecs.Fields.Item("CustomerID")
		Session.Contents("Name") =
WDRecs.Fields.Item("LogonName")		
%>
		<!--#include virtual=/oscardev/customer.asp-->
<%
	else
		Response.Write( "<p>" )
		Response.Write( "You are not authorized to logon to this
page" )
		Response.Write( "</p>" )
	end if
	WDRecs.Close()
	WDConn.Close()
------

The connection to the mysql database will randomly but frequently get
dropped.  Tracing the myodbc
yields (truncated at the point the drop is announced, and some fields
edited out):

--------
| | >mysql_option
| | | enter: option: 0
| | <mysql_option
| | info: MyODBC Version 2.50.22  option_flag: 4  client_flag: 64
| <get_client_flag
| >mysql_real_connect
| | enter: host: XXXX  db: WebData  user: XXXXX
| | info: Server name: 'XXXXX'.  TCP sock: 3306
| | >_mymalloc
| | | enter: Size: 8192
| | | exit: ptr: 83a33d0
| | <_mymalloc
| | packet: Memory: 83a33d0  Bytes: 10 51 46 50 50 46 49 57 98 0 
| | info: mysql protocol version 10, server=10
| | >my_multi_malloc
| | | >_mymalloc
| | | | enter: Size: 84
| | | | exit: ptr: 83b0db8
| | | <_mymalloc
| | <my_multi_malloc
| | info: Server version = '3.22.19b'  capabilites: 12
| | info: user: poweruser
| | >_mymalloc
| | | enter: Size: 8
| | | exit: ptr: 83b0b48
| | <_mymalloc
| | info: raw_net_read returned -1,  errno: 0
| | error: Couldn't read packet: remain: 4  errno: 0  length: -1
alarmed: 0
| | error: Wrong connection or packet. fd: 2540  len: -1
| | >end_server
| | | info: Socket: 2540
| | | >_myfree
| | | | enter: ptr: 83a33d0
| | | <_myfree
| | | >free_old_query
| | | <free_old_query
| | <end_server
| | error: message: 2013 (Lost connection to MySQL server during query)
| | >end_server

The client (web server) runs on NT.  The mysql db runs on UnixWare
7.0.1.
Versions of myodbc and mysql can be found in the trace above.

Does anyone know what the cause is?

Thanks!
John


---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail myodbc-thread247@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail myodbc-unsubscribe@lists.mysql.com instead.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic