help please with time out issue

J

john

Hello,

We have a tablet pc that is trying to sync data
to our main sql server during the night but we keep
getting a timeout issue. The tablet pc has an access
database that contains about 5000 rows of data. We have
setup the machine.config for a executionTimeout of 900.
Below is our code for the specific vb.net app and the
webservice it uses. Can someone see if I am missing
something as to why this is bombing out? Also is there a
we to do a trace to determine where it is actually
timeing out? Thanks in advance.

John


vb.net code for tablet pc
Dim ds As New DataSet()

Dim oleDr As OleDbDataReader

Dim update As String

Dim errnbr As Integer

Dim errmsg As String

Try

Dim Olecmd As New OleDbCommand( _

"SELECT projectid, unit, bldg, lot, plantype, unitplan,
phase, isdeleted,
updatedate " & _

"FROM seqsheets WHERE updatedate > #" & lastsync & "#",
OleDbConnection1)

Dim da As New OleDbDataAdapter(Olecmd)

cmd.CommandType = CommandType.Text

da.Fill(ds)

Service.Url = ServiceUrl

update = Service.InsertSeqsheet(ds)

If update <> "true" Then

errnbr = CInt(Microsoft.VisualBasic.Left(update, InStr
(update, "^") - 1))

errmsg = Microsoft.VisualBasic.Right(update, Len(update) -
InStr(update,
"^"))

SendErrorToDB("HH3 Name: " & HH3Name & " " & errmsg, "53-
" &
errnbr.ToString, "SendSeqsheets")

End If

Catch ex As OleDbException

SendErrorToDB("HH3 Name: " & HH3Name & " " &
ex.Message, "54-" &
ex.ErrorCode.ToString, " Trace: " &
ex.StackTrace.ToString)

Finally

If OleDbConnection1.State = ConnectionState.Open Then

OleDbConnection1.Close()

End If

End Try



webservice

Dim cnt As Integer

Dim x As Integer

Dim isdeleted As Integer

Try

Dim cn As New SqlConnection(strConn)

Dim dr As SqlDataReader

cn.Open()

With ds.Tables(0)

For x = 0 To .Rows.Count - 1

Dim cmd1 As New SqlCommand("SELECT count(*) FROM
seqsheets " & _

"WHERE projectid = " & CStr(.Rows(x).Item(0)) & " " & _

"AND unit = '" & CStr(.Rows(x).Item(1)) & "' " & _

"AND bldg = '" & CStr(.Rows(x).Item(2)) & "' " & _

"AND lot = '" & CStr(.Rows(x).Item(3)) & "'", cn)

dr = cmd1.ExecuteReader()

While dr.Read

cnt = dr.GetInt32(0)

End While

dr.Close()

If CStr(.Rows(x).Item(7)) = "true" Then

isdeleted = 1

Else

isdeleted = 0

End If

If cnt = 0 Then

Dim cmd As New SqlCommand( _

"INSERT INTO seqsheets (projectid, unit, bldg, lot,
plantype, unitplan,
phase, isdeleted, updatedate) " & _

"VALUES (" & CStr(.Rows(x).Item(0)) & ", '" & CStr(.Rows
(x).Item(1)) & "',
'" & _

CStr(.Rows(x).Item(2)) & "', '" & CStr(.Rows(x).Item(3))
& "', '" & _

CStr(.Rows(x).Item(4)) & "', '" & CStr(.Rows(x).Item(5))
& "', '" & _

CStr(.Rows(x).Item(6)) & "', " & isdeleted & ", '" & _

CStr(.Rows(x).Item(8)) & "')", cn)

cmd.CommandType = CommandType.Text

dr = cmd.ExecuteReader()

dr.Close()

Else

Dim cmd As New SqlCommand( _

"SELECT updatedate FROM seqsheets " & _

"WHERE projectid = " & CStr(.Rows(x).Item(0)) & " " & _

"AND unit = '" & CStr(.Rows(x).Item(1)) & "' " & _

"AND bldg = '" & CStr(.Rows(x).Item(2)) & "' " & _

"AND lot = '" & CStr(.Rows(x).Item(3)) & "'", cn)

cmd.CommandType = CommandType.Text

Dim vcChk As Date = CDate(cmd.ExecuteScalar)

Dim hhChk As Date = CDate(.Rows(x).Item(8))



If vcChk < hhChk Then

Dim cmd2 As New SqlCommand( _

"UPDATE seqsheets " & _

"SET plantype = '" & CStr(.Rows(x).Item(4)) & "', " & _

"unitplan = '" & CStr(.Rows(x).Item(5)) & "', " & _

"phase = '" & CStr(.Rows(x).Item(6)) & "', " & _

"isdeleted = " & isdeleted & ", " & _

"updatedate = '" & CStr(.Rows(x).Item(8)) & "' " & _

"WHERE projectid = " & CStr(.Rows(x).Item(0)) & " " & _

"AND unit = '" & CStr(.Rows(x).Item(1)) & "'" & " " & _

"AND bldg = '" & CStr(.Rows(x).Item(2)) & "'" & " " & _

"AND lot = '" & CStr(.Rows(x).Item(3)) & "'", cn)

cmd2.CommandType = CommandType.Text

dr = cmd2.ExecuteReader()

dr.Close()

End If



End If

Next

End With

cn.Close()

Return "true"

Catch ex As SqlException

Return CStr(ex.Number) & "^" & ex.Message

End Try
 
K

Ken Simmons

I had kind of the same problem with a webservice timing out. Change the
Machine.config file on this server -

Change the responseDeadlockInterval="00:03:00" to
responseDeadlockInterval="Infinite"
 
J

John

Ken,

I did as you suggested and still got the error. I set up a trace on the
webservice to see what was happening and I got a status code of 500 any idea
what that means? Any ideas on where to proceed from here on how to resolve
the issue? Thanks in advance.

John

--trace below--

Request Details

Request Details
Session Id: Request Type: POST
Time of Request: 9/24/2003 5:02:06 PM Status Code: 500
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate Size Bytes
(excluding children)
Headers Collection
Name Value
Content-Length 782108
Content-Type text/xml; charset=utf-8
Authorization Negotiate
TlRMTVNTUAADAAAAGAAYAGAAAAAYABgAeAAAAAAAAABAAAAAFAAUAEAAAAAMAAwAVAAAABAAEACQ
AAAANYKI4EkARQBhAHMAcABfAFUAUwBlAFIASABIADMALQAxADcA8JhNlnGhg9EAAAAAAAAAAAAA
AAAAAAAAD15xh+WxNUAsFLJCGyCx3YeQDSnn1bSmU9jloxhY/CHY6fcVuOCAgw==
Expect 100-continue
Host localhost
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.0.3705.288)
SOAPAction "http://localhost/service/service.asmx/Iseqsheet"
Server Variables
Name Value
ALL_HTTP HTTP_CONTENT_LENGTH:782108 HTTP_CONTENT_TYPE:text/xml;
charset=utf-8 HTTP_AUTHORIZATION:Negotiate
TlRMTVNTUAADAAAAGAAYAGAAAAAYABgAeAAAAAAAAABAAAAAFAAUAEAAAAAMAAwAVAAAABAAEACQ
AAAANYKI4EkARQBhAHMAcABfAFUAUwBlAFIASABIADMALQAxADcA8JhNlnGhg9EAAAAAAAAAAAAA
AAAAAAAAD15xh+WxNUAsFLJCGyCx3YeQDSnn1bSmU9jloxhY/CHY6fcVuOCAgw==
HTTP_EXPECT:100-continue HTTP_HOST:localhost HTTP_USER_AGENT:Mozilla/4.0
(compatible; MSIE 6.0; MS Web Services Client Protocol 1.0.3705.288)
HTTP_SOAPACTION:"http://localhost/service/service.asmx/Iseqsheet"
ALL_RAW Content-Length: 782108 Content-Type: text/xml; charset=utf-8
Authorization: Negotiate
TlRMTVNTUAADAAAAGAAYAGAAAAAYABgAeAAAAAAAAABAAAAAFAAUAEAAAAAMAAwAVAAAABAAEACQ
AAAANYKI4EkARQBhAHMAcABfAFUAUwBlAFIASABIADMALQAxADcA8JhNlnGhg9EAAAAAAAAAAAAA
AAAAAAAAD15xh+WxNUAsFLJCGyCx3YeQDSnn1bSmU9jloxhY/CHY6fcVuOCAgw== Expect:
100-continue Host: localhost User-Agent: Mozilla/4.0 (compatible; MSIE 6.0;
MS Web Services Client Protocol 1.0.3705.288) SOAPAction:
"http://localhost/service/service.asmx/Iseqsheet"
APPL_MD_PATH /LM/W3SVC/3/Root/service
APPL_PHYSICAL_PATH e:\inetpub\service\
AUTH_TYPE
AUTH_USER
AUTH_PASSWORD
LOGON_USER
REMOTE_USER
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 782108
CONTENT_TYPE text/xml; charset=utf-8
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID 3
INSTANCE_META_PATH /LM/W3SVC/3
LOCAL_ADDR
PATH_INFO /service/service.asmx
PATH_TRANSLATED e:\inetpub\service\service.asmx
QUERY_STRING
REMOTE_ADDR
REMOTE_HOST
REMOTE_PORT 1075
REQUEST_METHOD POST
SCRIPT_NAME /service/service.asmx
SERVER_NAME localhost
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/5.0
URL /service/service.asmx
HTTP_CONTENT_LENGTH 782108
HTTP_CONTENT_TYPE text/xml; charset=utf-8
HTTP_AUTHORIZATION Negotiate
TlRMTVNTUAADAAAAGAAYAGAAAAAYABgAeAAAAAAAAABAAAAAFAAUAEAAAAAMAAwAVAAAABAAEACQ
AAAANYKI4EkARQBhAHMAcABfAFUAUwBlAFIASABIADMALQAxADcA8JhNlnGhg9EAAAAAAAAAAAAA
AAAAAAAAD15xh+WxNUAsFLJCGyCx3YeQDSnn1bSmU9jloxhY/CHY6fcVuOCAgw==
HTTP_EXPECT 100-continue
HTTP_HOST localhost
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.0.3705.288)
HTTP_SOAPACTION "http://localhost/service/service.asmx/Iseqsheet"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top