[Mono-list] connection to sql server timing out

Nivaldo Fernandes nivaldo at anthill.hrcoxmail.com
Thu Apr 28 21:01:12 EDT 2011


Can someone please verify that Mono release 2.10.2 (just released) does not have some introduced bug that causes a timeout when logging to a SQL Server?

This used to work without a problem (IronPython code):

import System
from System import *
import clr
clr.AddReference("System.Data")
from System.Data import *
from System.Data.SqlClient import *
import sys

print "attempting connection to SQL Server..."
connSql = SqlConnection("server=some.server;database=some.db;uid=some.name;password=some.pwd")
connSql.Open()
print "connected to SQL Server"
sys.exit(0)

Also, my db connection that I set up in MonoDevelop (now using 2.4.2) used to work against the same server. But now it is also timing out. 

Here is the detailed message from the IronPython code:
attempting connection to SQL Server...
Traceback (most recent call last):
 File "TestSql.py", line 13, in <module>
EnvironmentError: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> Mono.Data.Tds.Protocol.TdsTimeoutException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
 at Mono.Data.Tds.Protocol.TdsComm..ctor (System.String dataSource, Int32 port, Int32 packetSize, Int32 timeout, TdsVersion tdsVersion) [0x00000] in <filename unknown>:0 
 --- End of inner exception stack trace ---
 at System.Data.SqlClient.SqlConnection.Open () [0x00000] in <filename unknown>:0 
 at (wrapper remoting-invoke-with-check) System.Data.SqlClient.SqlConnection:Open ()
 at (wrapper delegate-invoke) <Module>:invoke_void__this___SqlConnection (System.Data.SqlClient.SqlConnection)
 at Microsoft.Scripting.Interpreter.ActionCallInstruction`1[System.Data.SqlClient.SqlConnection].Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0 
 at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>

The SQL Server is version 09.00.3054 (2005). My OS is Mac OS X 10.6.7. 

Finally, the same IronPython code works from inside the Windows 7 virtual OS (VMWare Fusion 3.1.2)...all this may indicate there is a newly introduced problem with Mono 2.10.2.

thanks!


More information about the Mono-list mailing list