I have a method I am using to execute a command on the local host. I'd like to add a timeout parameter to the method so that if the command being called doesn't finish in a reasonable amount of time the method will return with an error code. Here's what it looks like so far, without the ability to timeout:
public static int executeCom...
I've been looking all over the place for a good timeout script that can kill a thread if it's been active for more than X seconds, but all the examples I've seen have flaws that don't always stop the thread. Using thread.join(x) ends up defeating the purpose of it being a thread.
The only decent example I've found is http://stackoverflo...
By both running test programs and looking at source code, it is clear that the method, as implemented by Sun, does not simply yield time to the specified thread, but actually it first attempts to obtain a monitor on the thread object. Specifically, the method is implemented as "synchronized."
Note that the wait and notify methods also ...
I'm looking for functionality in java identical to this in ruby:
SystemTimer.timeout_after(30.seconds) do
do something
end
i could achieve this by forking a thread and then killing it after a while, but is there a simpler way?
...
Hi,
I have the problem that I'm instanciating an object on the UI-thread (WinForms).
This object creation probably takes very long, and I would like to have some sort of a "timeout" for that method (because it's blocking my app).
The problems I have are:
1. the object must be created on the UI thread
2. the object is a foreign object,...
I currently have a WCF Service with a CallBack Contract (duplex), and when I use the application that makes use of it on my computer everything works fine, but when I try it from a different computer, it doesn't connect.
These problems started occurring once I switched to using this wsDualHttpBinding (for callbacks) because when I used ...
I would like to be able to abort a specific sql statement if it takes longer than a specified number of seconds. How can I do that?
For example, I would like to do something like:
SET NextStatementTimeOutSeconds = 60
SELECT * FROM MyTable
IF @@LastStatementTimedOut = 1
PRINT 'Statement timed out after 60 seconds'
ELSE
PRINT '...
When running Reorganize Index and Update Statistics in MS SQL Server 2005's maintenance plan, our production web server is timing out. I know that Reorganize Index is an online operation and that is why we chose it over Rebuild Index so we're at a loss. It's run after a Database backup, in the same maintenance plan, but I've read that i...
I have a T-SQL stored procedure with the signature
CREATE PROCEDURE MyProc
@recordCount INT OUTPUT
@param1 INT
...
When executed directly in Sql Server the procedure runs in under 5 seconds, returning a few result sets amounting to about 100 rows in total.
Calling this procedure using the ADO.NET SqlDataAdapter.Fill method to populat...
Hey all. I'm wondering how to implement a timeout event in the System.Windows.Forms.Webbrowser control?
...
OK I keep getting this error after about 3-4 minutes of churning:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the e...
I have a Java application which uses a third-party COM component through a Java-COM bridge.
This COM component opens a socket connection to a remote host.
This host can take some time to respond, and I suspicious that I'm getting a timeout. I'm not sure because as I said, it's a closed-source third-party component.
The API of this comp...
I'm writing an application that utilizes Javascript timouts and intervals to update the page, is there a way to see how many intervals are setup? I want to make sure that I'm not accidentally going to kill the browser by having hundreds of intervals setup.
is this even an issue?
...
On full .Net Framework I use the following code:
socket.SetSocketOption(
SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, readTimeout);
socket.SetSocketOption(
SocketOptionLevel.Socket, SocketOptionName.SendTimeout, writeTimeout);
However, Windows Mobile does not support this and throws exceptions.
I am currently in the...
We are using C# and Linq2SQL to get data from a database for some reports. In some cases this takes a while. More than 30 seconds, which seems to be the default CommandTimeout.
So, I guess I have to up the CommandTimeout. But question is, how much? Is it bad to just set it very high? Wouldn't it be bad if a customer was trying to do so...
What is the default session timeout value in ASP.NET?
...
We are tying to perf tune our drupal site.
We are using Siege to measure performance (as drupal visitor).
Env:
Nginx + FastCGI+ Memcache
Siege runs fine for a few seconds, and then we run into connection errors:
Example:
HTTP/1.1 200 29.18 secs: 5877 bytes ==> /
HTTP/1.1 200 29.39 secs: 5877 bytes ==> /
warning: socket: -16562...
I need to call a library function that sometimes won't terminate within a given time, unfortunately. Is there a way to call the function but abort it if it doesn't terminate within n seconds?
I cannot modify the function, so I cannot put the abort condition into it directly. I have to add a timeout to the function externally.
Is it may...
Here's the thing...
I've been working on this issue for a long time now with no luck
I have a WCF service hosted on IIS (I also tried in a console host and I get the same behavior) which I call thru my scvutil created proxy, and the service fails to respond after a few (very few calls).
But, here are a few clues:
1- It only happens on ...
I'm building a windows service that grabs information from a website periodically
How can I start looking again when a exception is caught? for example when internet goes down and up later.
Code:
public string cadena(string pagina)
{
try
{
String cadena;
WebRequest myWebR...