SqlBulkCopy unusual TimeOut Error - sqlbulkcopy

I have a SqlBulkCopy operation that is taking data from an MS-Access 2007 database (via OleDbConnection) and using SqlBulkCopy to transfer that data to a SQL Server database. This has previously been working and continues to work for one MS-Access database, but not the other.
I get the error message:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
It is hard to believe it is a timeout ast the oledbCommand.CommandTimeout = 0 the sqlBulkCopy.BulkCopyTimeout = 0 and on either side (MS-Access and SQL Server the timeouts have now been set to 0).
Are there other issues/exceptions that the above error message could be hiding? Is there a way to determine what the base cause of a sqlBulkCopy.WriteToServer exception is (there doesn't appear to be any inner exceptions etc...)

So the issue was that there were dates being transfered and some of those dates were invalid for SQL, but valid in Access. For whatever reason this was presenting as a Timeout rather than "invalid date/time" - though if you reduce the data being transfered to a handful of rows (200) rather than the full transfer (500,000) it reports as invalid date/time ... curious.

Related

Facebook Conversions API - Invalid Timestamp errors

I am receiving a handful of errors regarding the event timestamp. I have confirmed that I am sending a UNIX timestamp in seconds. This is what I have implemented in the front-end of our code to get the UNIX timestamp in seconds: Math.round(Date.now() / 1000)
Also, it looks like less then 1% of the events are affected for each event created, so that's why I'm a bit confused and not sure how to resolve these errors.
Error message:
The timestamp for the InitiateCheckout events sent from your server is in the future. Timestamps are metadata sent alongside each event you send from your server and they represent the time of day when an event actually occurred. For example: the time that a customer made a purchase on your website. All timestamps should represent a point in time that occurred within the last 7 days"
Click here to see a screenshot of the errors
Has anyone encountered these type of errors? If so, any advice on how to resolve them?
I am not sure how to go about this

SlashDB error: 'ResultProxy' object has no attribute 'execution_options'

I have a SlashDB installation on top of MySQL. Once in a while, especially after a period of time of inactivity, the first call to an API returns:
'ResultProxy' object has no attribute 'execution_options'
The second request (same endpoint) would work normally.
My guess was that SlashDB's connection to MySQL had been terminated due to inactivity. I set the wait_timeout system variable (MySQL) to about 10 hours and it seems to help in some cases.
What does this error mean, and is there a way to prevent it?
This should no longer occur in version 1.0, but in case you still have a problem please post a dump of your database schema with your question.

OutSystems e-mail fails after 100s

I'm using OutSystems plataform and recently I'm getting timeout from a periodic e-mail. The timer responsible for this action has 20min timeout but the timer fails after 100s.
Some times the timer executes in 99s and the process finish successfully.
The error:
OutSystems.HubEdition.RuntimePlatform.EmailException: Error creating Email. The operation has timed out
How can I change this behavior to extend this 100s timeout?
You can increase the timeout setting on the Aggregate / Advanced query that you are using to retrieve the data.
Improving the query is always first prize, but increasing the timeout could by you some time.
UPDATE
According to the OutSystems documentation you cannot set the timeout for email rendering. You would have to speed up the rendering.
You could perhaps split your logic into an action that executes the query and stores the result for quick retrieval during the email preparation.
Probably the issue you're having is that the email is taking too long to render. You can check if this is the case by looking at the error log in Service Center. You should see something like:
Error creating Email. The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at OutSystems.HubEdition.RuntimePlatform.Email.EmailHelper.HttpGetContent(String ssUrl, String method, String contentType, String userAgent, Cookie cookie, QueryParameter[] parameters, String& ssContent, String& ssContentEncoding)
If this is the case, you need to optimize the email in order to render it faster. One good place to start looking is the Slow Queries report, maybe you have some long running query that's slowing down your email rendering...
Best of luck! If you want more details, you can check this community post.

Sybase ASE is terminating this process. Connection died while writing to socket

In Sybase, we are intermittent exception like
System.Data.OleDb.OleDbException (0x80004005): [08S01]
[ASEOLEDB]ASE is terminating this process.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForMultpleResults(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
or
System.Data.OleDb.OleDbException (0x80004005): [08S01]
[ASEOLEDB]Sybase Connection died while writing to socket. Socket returned error code 10053.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForMultpleResults(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
The number of records in the table is less than 200K and queries are typically inline inserts or select with temporary tables
After the disconnection, we need to recycle the thread or bounce the process.
Do we need to change at Sybase configuration end? Or inside the application process?
This is likely an issue on the side of the ASE server. Check out the ASE errorlog file, there should be a stack trace with clues as to why the process was terminated. Depending on what you find there, you may need to contact TechSupport and get the latest patch, or incrementing certain ASE config settings might also help.
I generally have seen this error phrasing when the connection is a victim of a deadlock situation. If that's the case it should be in the ASE error logs.
Here we have a generic WinSock "10053" error code, displayed from the OS where the .net (ASE, Oledb, etc...) client is calling the DB.
It is possible that you find nothing in the ASE error logs (unless you activate a specific user tracing), because the server is closing the connection in a standard way, while the Sybase client software has cached its request and is still writing to the windows socket (btw, yes, it is a bug/issue: you could search the latest information on EBFs and software maintenance or open a new support request).
I've had this problem when creating a temporary table (from .Net ASE Client dll): possible cause is that the local temporary table get dropped if the connection is returned to the connection pool (in fact the error was present each day at the first trial). I've tried turning off the connection pooling in connection string and that worked for me.
Data Source=myASEsrv;Port=nnnn;Database=myDB;Uid=myUsr;Pwd=myPswd;Pooling=False;

"JSONValue failed" Error while fetching data from server into iPhone

I am fetching data from server into my iPhone app.
For fetching data from server, I am using HTTP Post method and for parsing data obtained I am using SBJSON Parser.
When the first time my app launches, the data is not fetched.
It shows the following failure log in Console. The app does not crash but just that data is not fetched.
<html>Your request timed out.
Please retry the request. </html>
2011-04-21 08:39:06.339 Hive[1594:207] -JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x4cabe90 {NSLocalizedDescription=Unrecognised leading character}"
)
The app fetches data properly from the second time onwards. It only gives this error when the app runs the first time.
What could be wrong?
Without analysis of the server and its resources it is difficult to determine why the server is taking too long to respond.
One thing to think about is how much time occurs between the last time you make the JSON attempt and the next time you make your "first attempt". Maybe then see if you an recreate it using a web browser.
Is the server a production quality server? If not, it may be "spinning up" to answer the first request which takes too long for the first response.
Personally, I wrote a generic JSON feed class that has a failure retry option. If it receives nothing or invalid JSON, it will retry x times at y seconds intervals based on what you pass it. It takes a little more work initially but it will payoff for two reasons.
1) It can be reused over and over and an update, like using ASIHTTRequest like Terente's good suggestion can be made in a single file.
2) While you may not expect a response to fail, server slowness or network issues can occur causing a flawed response.
You could use ASIHTTRequest and if you get an time out try to make an new request to the server.