connection-timeout

Set database connection timeout in CodeIgniter 3

自闭症网瘾萝莉.ら 提交于 2019-12-01 18:22:26
We are working with 2 databases, our local database and an external database. But now our external database is down (we're still under development so it's good we came across this issue) and it now tries to connect to the external database for 30 seconds, how can I change the connection timeout of the Database to something like 1 - 2 seconds? I am using Codeigniter with the PDO drivers on my databases. Is there anyone with a clean solution for this problem? It is not a documented feature, but you can do this from the database config file ( application/config/database.php ) by adding options

Shortening socket timeout using Timeout::timeout(n) does not seem to work for me

时光怂恿深爱的人放手 提交于 2019-12-01 00:35:35
I found what I thought should work perfectly at https://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 timeout. Any ideas why? The following code seems to work with ruby 1.9.1 on Windows: require 'socket' def is_port_open?(ip, port) s = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0) sa = Socket.sockaddr_in(port, ip) begin s.connect_nonblock(sa) rescue Errno:

Shortening socket timeout using Timeout::timeout(n) does not seem to work for me

半城伤御伤魂 提交于 2019-11-30 19:05:50
问题 I found what I thought should work perfectly at https://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 timeout. Any ideas why? 回答1: The following code seems to work with ruby 1.9.1 on Windows: require 'socket' def is_port_open?(ip, port) s = Socket.new(Socket::AF

Node.js Server Timeout Problems (EC2 + Express + PM2)

佐手、 提交于 2019-11-30 13:56:36
I'm relatively new to running production node.js apps and I've recently been having problems with my server timing out. Basically after a certain amount of usage & time my node.js app stops responding to requests. I don't even see routes being fired on my console anymore - it's like the whole thing just comes to a halt and the HTTP calls from my client (iPhone running AFNetworking) don't reach the server anymore. But if I restart my node.js app server everything starts working again, until things inevitable stop again. The app never crashes, it just stops responding to requests. I'm not

How to Fix Read timed out in Elasticsearch

最后都变了- 提交于 2019-11-30 11:51:29
问题 I used Elasticsearch-1.1.0 to index tweets. The indexing process is okay. Then I upgraded the version. Now I use Elasticsearch-1.3.2, and I get this message randomly: Exception happened: Error raised when there was an exception while talking to ES. ConnectionError(HTTPConnectionPool(host='127.0.0.1', port=8001): Read timed out. (read timeout=10)) caused by: ReadTimeoutError(HTTPConnectionPool(host='127.0.0.1', port=8001): Read timed out. (read timeout=10)). Snapshot of the randomness:

SoapUI: ConnectException: Connection timed out:

孤者浪人 提交于 2019-11-30 08:07:35
i try to send request via REST. I get success response when using firefox rest-client, but in SoapUI i get exception attached below. How to resolve this issue? Thanks. java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net

Multiple Simultaneous SQL Connection Timeouts In Multithreaded Windows Service

旧城冷巷雨未停 提交于 2019-11-30 01:37:22
I have a multithreaded Windows Service I've developed with VS 2010 (.NET 4.0) which can have anywhere from a few to a few dozen threads, each retrieving data from a slow server over the Internet and then using a local database to record this data (so the process is Internet-bound, not LAN or CPU bound). With some regularity, I am getting a flood/flurry/burst of the following error from several threads simultaneously: System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The call stack

How to Fix Read timed out in Elasticsearch

风格不统一 提交于 2019-11-30 01:30:29
I used Elasticsearch-1.1.0 to index tweets. The indexing process is okay. Then I upgraded the version. Now I use Elasticsearch-1.3.2, and I get this message randomly: Exception happened: Error raised when there was an exception while talking to ES. ConnectionError(HTTPConnectionPool(host='127.0.0.1', port=8001): Read timed out. (read timeout=10)) caused by: ReadTimeoutError(HTTPConnectionPool(host='127.0.0.1', port=8001): Read timed out. (read timeout=10)). Snapshot of the randomness: Happened --33s-- Happened --27s-- Happened --22s-- Happened --10s-- Happened --39s-- Happened --25s-- Happened

Appengine connection time out error

我的未来我决定 提交于 2019-11-29 17:57:56
I have been trying to create app engine module using java.It has been working well .But now it suddenly start to show error Error:Execution failed for task ':backend:appengineEndpointsGetClientLibs'.There was an error running endpoints command get-client-lib: connect timed out My stack trace is FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':backend:appengineEndpointsGetClientLibs'. > There was an error running endpoints command get-client-lib: connect timed out * Try: Run with --info or --debug option to get more log output. * Exception is: org.gradle

ActiveRecord::ConnectionTimeoutError happening sporadically

一世执手 提交于 2019-11-29 16:31:42
问题 Whenever I have an application using ActiveRecord I get this ConnectionTimeoutError - but always after a certain unknown period of time ActiveRecord::ConnectionTimeoutError (could not obtain a database connection within 5 seconds. The max pool size is currently 30; consider increasing it.): It was previously set to 5, we have already increased it, and there is no way it can be using 30 connections at the same time. The only thing we use ActiveRecord for is our session store. Our database.yml