timeout

Socket timeout not working

白昼怎懂夜的黑 提交于 2019-12-13 15:06:36
问题 I have a TCP Socket running on a C# machine. I need to connect that server socket from Android via Server IP and port as below: InetAddress serverAddr = InetAddress.getByName(serverIp); Socket socket = new Socket(serverAddr, serverPort); socket.setSoTimeout(10*1000); If c# machine doesn't have socket running on Android it hangs on: Socket socket = new Socket(serverAddr, serverPort); I need to implement 5 seconds as timeout like if it doesn't find server socket on this ip it could simply

MSTest: how to increase test time

心已入冬 提交于 2019-12-13 12:24:12
问题 I have one test that needs to work more then 1 minute (VS2008, MSTest, tests are launched from the VisualStudio): const int TestTimeout = 1; [TestMethod] [Timeout(10*60*1000)] // 10 minutes public void Login_ExpirationFail_Test() { IAuthenticationParameters parameters = new AuthenticationParameters(...); LdapAuthentication auth1 = new LdapAuthentication(); IAuthenticationLoginResult res = auth1.Login(parameters); Assert.IsNotNull(res); Assert.IsFalse(string.IsNullOrEmpty(res.SessionId));

PHP: “The website has too many redirects” when use php sessions with time

蹲街弑〆低调 提交于 2019-12-13 12:17:37
问题 I've a problem when use this code in my page: Code with expire session <?php session_start(); if(!isset($_SESSION['clientmacs']) ) { header('Location: index.php'); } else { if(time() - $_SESSION['timeLogin'] > 1800) { header('Location: include/logout.php'); } $userclient = $_SESSION['clientmacs']; ?> <html> HTML CODE </html> <?php } ?> But if I use this code the problem disappears and the page works normally: Code without expire session <?php session_start(); if(!isset($_SESSION['clientmacs']

Why does my Netbeans Xdebug session timeout after period of inactivity

南笙酒味 提交于 2019-12-13 12:03:19
问题 I love the way the Netbeans helps me to debug my Magento applications (in XAMPP on Win 7 64-bit), but I've noticed that the connection seems to timeout after a period. The breakpoints no longer get hit and I have to restart the debugging session which is annoying. Any suggestions for how to extend or disable the debug timeout? I can't see any options in the IDE or Xdebug php.ini config. The Xdebug documentation states: When the URL variable XDEBUG_SESSION_START=name is appended to an URL,

Implement timeout in windows filecopy

喜欢而已 提交于 2019-12-13 08:00:02
问题 I want to copy a list of files on windows using python. When doing that manually, I see timeouts in some files, therefore the copy process fails. I need a way to implement the timeout check in python. So far I use the win32 API: import win32file files = {'source_a' : 'dest_a', 'source_b' : 'dest_b'} for f in files.keys(): win32file.CopyFileW(f,files[f],0) In some cases, the CopyFileW function doesn't return in "reasonable time", for the sake of this discussion, let's say 5 seconds. How can I

How can set different session timeout

守給你的承諾、 提交于 2019-12-13 07:33:35
问题 How we can set different session timeout in each part of a website in asp.net c#. I know that we can manage session timeout by web config but when we change session timeout in web config the specified value set for all of my website but I want to manage session timeout in my program for example in administrator want to set session timeout 2 hours and in login user area set session timeout to 10 minute. 回答1: You can change the SessionTimeout of the current HttpContext. When an administrator

php timeout (pause time) in a loop

烂漫一生 提交于 2019-12-13 06:29:47
问题 I'm trying to figure out how to pause a loop in php so it executes once every 5 minutes for example while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ //send email to a member // pause for a minute then continue the loop } simple example for($x=0;$x<=4;$x++){ echo $x."<br>"; sleep(5); // the loop will be delayed for 25 seconds then it'll print 5 lines at once } 回答1: This script works as you expect. Every iteration of the loop is being delayed 5 seconds. However, what you are seeing is the output

What defines the timeout period in PHP?

扶醉桌前 提交于 2019-12-13 06:27:32
问题 Say, I have PHP running on an Apache. When someone makes a client request (doesn't matter how), what defines the amount of time that the client will wait for, the script to run? Is this option of an Apache, of a PHP or is defined by the client himself? Also, what if the script is called via curl? 回答1: See PHP set_time_limit() Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max

AudioRecord obtainBuffer Timed out with AudioRecorder.startRecording()

[亡魂溺海] 提交于 2019-12-13 06:22:46
问题 I have a problem with my program which records the microphone. Sometimes when I run it I have the following warnings and no sound is actually recorded: 12-14 11:17:50.660: W/AudioRecord(1857): obtainBuffer timed out (is the CPU pegged?) user=00000000, server=00000000 From what I have found, other have this problem with AudioTrack as explained here and here. However, for me it is AudioRecord which is not working properly. I understand that the buffer cannot be created for whatever reason. The

Increasing Timeout for WCF hosted on iis7

旧巷老猫 提交于 2019-12-13 06:11:57
问题 I have a WCF hosted on IIS7. When I try to consume a service that takes more than 90 seconds to produce results, it times out after 90 second. In web config, I have increased my executionTimeout to 900 seconds <system.web> <compilation debug="false" strict="false" explicit="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" executionTimeout="900" shutdownTimeout="900" maxRequestLength="2097152" enable="true"/> <pages> <namespaces> <add namespace="System.Runtime.Serialization"/>