timeout

socket read timed out - should I go for 0 (inifite)

徘徊边缘 提交于 2020-01-06 19:38:32
问题 I'm downloading a big file (say around 100mb) and I'm receiving SocketException: Read timed out every now and then. I'm thinking of raising the socket timeout. Actually, I'm thinking of setting the socket timeout to 0 (infinite) as eventually the sizes that the files that my app will be downloading may even go greater than 300mb, or even greater than 300mb. Is this a good practice? Regarding socket timeout, when does the timeout countdown actually starts? I mean, when a socket timeout occurs,

Why InputStream is stopping my application?

随声附和 提交于 2020-01-06 12:38:12
问题 I have an Android App that talks with a Java Server between socket connection. When server is running, there's no problem. I send something from Android and server answer. I get response and put it in Toast. Looks great! But if i stop running server, Android stay waiting for answer and all application stop working. Strange is the fact that application in running inside a thread, so i think its not supposed to happen. I'd like to know if is there some way to avoid it to crash application and

Stack operations terminating due to timeout [closed]

人盡茶涼 提交于 2020-01-06 09:01:27
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I'm working on a problem where I am to create a stack, implement a series of operations on that stack given as an array of strings (3 variations: push x , pop , inc y x ), and print out the top of the stack (or EMPTY if the stack is left empty) after each operation. Push and pop are

stream_set_timeout not working for ssh2_exec in PHP

瘦欲@ 提交于 2020-01-06 08:14:24
问题 I am having trouble when try to set timeout for my ssh2_exec connection in PHP, so that when there is something wrong when running the command, it will release the executing thread and will not jam the whole web site. I have tried stream_set_timeout($stream,$seconds) but it seems not to work as expected. Is there any ideas on this? //run specified command (ssh) function runCMD($cmd){ if (!($stream = ssh2_exec($this->conn, $cmd ))) { echo "fail: unable to execute command\n"; fclose($stream);

First connect from Prestashop to Google Cloud SQL always fails

非 Y 不嫁゛ 提交于 2020-01-06 07:01:07
问题 I'm setting up a PrestaShop installation on a development server which is a GCE instance and using Cloud SQL as a database server. Everything works just fine except one thing: whenever there is a long period of inactivity on the site, the first page load after that always gives me this error: Link to database cannot be established: SQLSTATE[HY000] [2003] If I refresh the page the error is gone and never appears again until I stop using the site for an hour or so. It almost looks like database

In what condition will cause LockAcquisitionException and SQLCODE=-911, SQLSTATE=40001, SQLERRMC=68

只谈情不闲聊 提交于 2020-01-06 06:52:21
问题 As my understanding, LockAcquisitionException will happen when a thread is trying to update a row of record that is locking by another thread. ( Please do correct me if I am wrong ) So I try to simulate as follow: I lock a row of record using dbVisualizer , then I using application to run a update query on the same record as well. At the end, I am just hitting global transaction time out instead of LockAcquisitionException with reason code 68. Thus, I am thinking that my understanding is

Chef Berks Install (Berkshelf) Timesout contacting Artifactory repository (Faraday Timeout / Actor Crashed)

不羁的心 提交于 2020-01-06 05:59:53
问题 Artifactory 5.8.4 Professional Chef Development Kit Version: 1.1.16 chef-client version: 12.17.44 delivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103) berks version: 5.2.0 kitchen version: 1.14.2 In Artifactory, I have this repository (virtual): avirtual-repo Berksfile contains : # cat Berksfile # vim: ft=berksfile.ruby: source "http://artifactory-server:8181/artifactory/api/chef/avirtual-repo" cookbook "top_level_cookbook_name", ">= 0.0.0" When, I'm running berks install , it

Operations timeout in Hibernate [closed]

梦想与她 提交于 2020-01-06 03:06:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Learning hibernate..please go easy :) This is my main class i am using to perform operations depending on users choice : package hibernate_tut_emp; import java.util.Iterator; import java.util.List; import java.util.Scanner; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate

HttpWebRequest Operation Timeout with CookieContainer

心已入冬 提交于 2020-01-05 08:09:45
问题 When I am using HttpWebRequest and add this: CookieContainer container = new CookieContainer(); request.CookieContainer = container; it will throw an Operation Timeout exception in HttpWebResponse response = request.GetResponse() as HttpWebResponse; If I don't add the CookieContainer the program runs without errors. Why doesn't this work? 回答1: How are you creating Request object?? HttpWebRequest request = (HttpWebRequest)WebRequest.Create(args[0]); request.CookieContainer = new

F# can't catch TimeoutException

戏子无情 提交于 2020-01-05 07:44:08
问题 My question is really simple. Please take a look at screenshot: How could that happen? I explicitly put call to Async.RunSyncronously into try ... with . 回答1: try/with in F# async workflows do not map directly to CLR protected blocks - instead if exception is raised in user code, library code will catch it and re-route to the nearest error continuation (which can be i.e with block , finally block , custom error continuation supplied in Async.StartWithContinuations etc...). This has a