[Microsoft][ODBC SQL Server Driver]Timeout expired

Results 1 to 3 of 3

Thread: [Microsoft][ODBC SQL Server Driver]Timeout expired

  1. #1
    The Other Steve Guest

    Default [Microsoft][ODBC SQL Server Driver]Timeout expired

    Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e31&#039; <BR>[Microsoft][ODBC SQL Server Driver]Timeout expired <BR>List.asp, line XXX<BR><BR><BR>Ok, here is some background info before we get started<BR><BR>Windows NT 4.0 (latest SP)<BR>SQL Server 7 (Latest SP)<BR>Server 1 (Dev server) Dual P2 400, 256 RAM <BR>Server 2 (Production Server) Quad PIII Zeon 550&#039;s, 2 gig ram<BR><BR>The Application I am creating is a file database, no files are stored in the database, just their URL. Some of the things in this application I would have never done on my own, but this application was "inherited" to me... I won&#039;t get into all of the details, but basically there is a form, and the user fills out information on the file they are uploading to the server (Operating System, Product, Commodity, filename, version, etc.) The Operating system, Product, and Commodity fields are a one to many relationship with other tables. so on the form they are select boxes that you can choose multiple items from. If the user goes and creates a driver and only chooses one item from each of these fields, we have never gotten the error message. the problems so far only seem to come when multiple choices are selected. (which field they choose multiple items from seems not to matter)<BR><BR>here is a brief layout of the logic we are using in the app...<BR><BR>ASP Page displays form, choice boxes are prepopulated from the appropriate tables in the database<BR>User fills out form and clicks submit... form is submitted to the LIST.asp page...<BR>---List.asp Uploads file to directory on the server (SAFileUpload) (This works every time)<BR>---List.asp executes stored procedure uspNewFile passing everything from the form, OS, Product, and Commodity fields are comma delimited strings containing the IDs of the selections<BR>------Stored Procedure uspNewFile calls spCreateFile passing fileame, server location, and other simple info...<BR>---------Stored Procedure spCreateFile adds entry to File Table and returns FileID<BR>------Stored Procedure uspNewFile calls spAddOS passing the comma delimited string for os&#039;s, and the FileID<BR>---------Stored Procedure spAddOS parses comma delimited string to an array<BR>---------For every item in the array, spAddOS adds an entry in the OSFile table (OSid, FileID)<BR>---------spAddOS returns ErrorLevel<BR>------Stored Procedure uspNewFile calls spAddProduct passing the comma delimited string for products, and the FileID<BR>---------Stored Procedure spAddProduct parses comma delimited string to an array<BR>---------For every item in the array, spAddProduct adds an entry in the ProductFile table (ProductID, FileID)<BR>---------spAddProduct returns ErrorLevel<BR>------Stored Procedure uspNewFile calls spAddCom passing the comma delimited string for commodities, and the FileID<BR>---------Stored Procedure spAddCom parses comma delimited string to an array<BR>---------For every item in the array, spAddCom adds an entry in the ComFile table (ComID, FileID)<BR>---------spAddCom returns ErrorLevel<BR>------Stored Procedure uspNewFile returns error level<BR>---List.asp calls Stored Procedure uspListFiles<BR>------uspListFiles does a select statement with inner joins and all that stuff to list all of the files in the DB and returns a RS<BR>---List.asp display the RS all pretty like...<BR><BR><BR>Kind of complicated, but not brain surgery... <BR><BR>anyway, whenever the user selects multiple products, os&#039;s or commodities, (We have seen the error with 3 while we have seen it work with 20) there is about a 50/50 chance we will see this error message... it usually (but not always) errors out on the line where the recordset is being returned from uspListFiles. but it has also errored out on the uspNewFile several times. every time we get the error we can take the SQL string off the page (we response.write it before we execute it) and throw it in query analyzer, and it will work flawlessly every time.<BR><BR>We have set every timeout we can find to 6000 seconds (&#060;%Server.ScriptTimeout = 6000%&#062;), (objCon.connectiontimeout = 6000), the Time limit on the DSN, and one in SQL itself (I don&#039;t remember where I found it) and we still get the error after about 5 seconds... we have already commented out the upload portion of the code, to make sure that was not causing it, and it still does it... we have tried response.redirecting back to a blank list.asp page after the form is processed... and we have pulled almost every hair out of our heads trying little things here and there... <BR><BR>A bizarre clue that may help you figure this one out is this... during our troubleshooting we moved the code and DB from the Dev server and placed it on the production server and thought we had the problem licked because we did not get the errors after several attempts, after we bragged to our boss that we fixed the issue we realized that the include file was still pointing to the Dev DB, and not the DB on the production server. as soon as we corrected this, the errors started happening again.<BR><BR>has anyone out there seen something like this, anyone know of a timeout variable hidden away somewhere (like the timeout used when a stored procedure executes another stored procedure), anyone got an extra bottle of Rogaine for all this hair I am loosing??? any information would be a great help... thanks in advance...<BR><BR>~the other Steve...<BR>

  2. #2
    Join Date
    Dec 1969

    Default extend timeout period

    If it is a timeout error, then I suggest you try extending the timelimit.<BR>Try something like this:<BR>Where 300 = 300 seconds or 5 minutes.<BR><BR>Server.ScriptTimeout = 300<BR><BR>Place towards the top of your asp page.

  3. #3
    The Other Steve Guest

    Default RE: extend timeout period

    I have done this... I have<BR>&#060;%Server.ScriptTimeout = 6000%&#062;<BR>and it still times out after about 5 secs...<BR><BR>I thought I mentioned that in my last post... I guess I forgot to mention that... I have also set <BR>&#060;%objCon.connectiontimeout = 6000%&#062;<BR><BR>still getting it... <BR><BR>any other ideas?<BR><BR>~The Other Steve

Posting Permissions

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