I have a server hosting a website of mine that has almost zero-traffic.
A few people (< 20) enter the site every day, and a few RSS readers are subscribed to some feeds we put out.
Almost every night, an RSS reader will hit us in the middle of the night and get an exception that the website can't connect to the SQL Server because of a T...
Hi I have created socket program in Blackberry. and also set socket to keep alive using the following
socket = (SocketConnection) Connector.open(URL);
socket.setSocketOption(socket.KEEPALIVE, 2);
But my socket connection gets terminated after 2-3 minute. Means if I keep Ideal for 2-3 minute for 2-3 minute then m...
Hi,
Here is an outline of my app:
require 'sinatra'
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => "mysql", host => $DB_HOSTNAME,
:database => $DB_NAME,:username => $DB_USERNAME,:password => $DB_PASSWORD)
class Sometable < ActiveRecord::Base
end
get '/' do
#stuff with Sometable
end
# a lot ...
Hi,
I have some ASP (Classic) code that queries a SQL 2005 Express database. I'm currently handling programmatically if this DB goes down by handling the error when someone tries to connect and can't. I capture the error and bypass subsequent db queries to this database using a session variable.
My problem is that this first query take...
I read this advice from error message:
You should consider either expiring
and/or testing connection validity
before use in your application,
increasing the server configured
values for client timeouts, or using
the Connector/J connection property
'autoReconnect=true' to avoid this
problem.
I'm using Spring and JPA. W...
I have the following PowerShell code:
function Get-SmoConnection
{
param
([string] $serverName = "", [int] $connectionTimeout = 0)
if($serverName.Length -eq 0)
{
$serverConnection = New-Object `
Microsoft.SqlServer.Management.Common.ServerConnection
}
else
{
$serverConnection...
Hi folks,
I get the following error upon running a query.
*
System.Data.SqlClient.SqlException: Timeout expired.
The timeout period elapsed prior to completion of the operation or the server is not responding. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
*
Is this a connection timeo...
Hi, I have an ipod touch program that should receive messages from a server program on my mac. To make sure that the touch can receive messages from a computer other than a mac, I programmed the server in C++. If I run both the server and the ipod app on the same computer (the app running on the simulator), the connection is fine and eve...
Hi,
I have a website using Microsoft SQL 2008 server over local network. Sometimes, SQL server machine is rebooted, and so the website fails to connect to the database. If the machine is up and running, it will respond fast. If it's down, there is no need to wait for 15 seconds. 3 seconds are ok.
I want to display apologizes on the web...
I found what I thought should work perfectly at http://stackoverflow.com/questions/517219?tab=oldest#tab-top but, it did not work for me.
I have Ruby 1.9.1 installed on Windows and, when I try the example "is_port_open" test, it does not work. The socket call still takes around 20 seconds to timeout no matter what value I set for the ti...
$url = 'http://a.url/i-know-is-down';
//ini_set('default_socket_timeout', 5);
$ctx = stream_context_create(array(
'http' => array(
'timeout' => 5,
'ignore_errors' => true
)
)
);
$start = microtime(true);
$content = @file_get_contents($url, false, $ctx);
$end = microtime(true);
echo $end - $start, "\n";
...