I use RubyMine and its remote debugger. At a breakpoint I want to make an IMAP request so it take a long time. But I get an exception "Timeout: evaluation took longer than 10 seconds."
I tried to increase debug connection timeout in Settings->Debugger. But obviously this trick didn't work.
So is it possible to increase evaluation expresion timeout in RubyMine debugger?
You can change it. Open up Preferences and under Build, Execution, Deployment, select Debugger. From there, there is an option Debug connection timeout (s). Change that value. Or just search for `Debug connection timeout and it should show up highlighted.
My problem was actually not in RubyMine debugger. So the question isn't correct. I've found that the reason of timeout was actual time out of a web-server worker. So the fix is in changing worker timeout. Currently, I'm using Puma, and for it the fix is next (taken from this answer):
# config/puma.rb
if ENV['RACK_ENV'] == 'development'
worker_timeout 3600
end
For those who still looking for an answer, check client.timeout setting. I had the same problem with client.timeout = 240 but works for me with client.timeout = 60. Hope this helps.
Related
I have a job in interruptible sleep state (S), hanging for a few hours.
can't use gdb (gdb will hang when attaching to the PID).
can't use strace, strace will resume the hanging job =(
WCHAN field shows the PID is waiting for ptlrpc. After some search online, it looks like this is a lustre operation. The print files also revealed the program is stuck in reading data from lustre. Any idea or suggestion on how to proceed the diagnose? Or possible reason why the hanging happens?
You can check /proc/$PID/stack on the client to see the whole stack of the process, which would give you some more information about what the process is doing (ptlrpc_set_wait() is just the generic "wait for RPC completion" function).
That said, what is more likely to be useful is to check the kernel console error messages (dmesg and/or /var/log/messages) to see what is going on. Lustre is definitely not shy about logging errors when there is a problem.
Very likely this will show that the client is waiting on a server to complete the RPC, so you'll also have to check the dmesg and/or /var/log/messages To see what the problem is on the server. There are several existing docs that go into detail about how to debug Lustre issues:
https://wiki.lustre.org/Diagnostic_and_Debugging_Tools
https://cug.org/5-publications/proceedings_attendee_lists/CUG11CD/pages/1-program/final_program/Wednesday/12A-Spitz-Paper.pdf
At that point, you are probably best off to check for existing Lustre bugs at https://jira.whamcloud,com/ to search for the first error messages that are reported, or maybe a stack trace. It is very likely (depending on what error is being hit), that there is already a fix available, and upgrading to the latest maintenance release (2.12.7 currently), or applying a patch (if the bug is recently fixed) will sole your problem.
In my source code, the following code is to issue the "sc stop myservice" and "sc start myservice",
system(stopcmd.c_str());
Sleep(10*1000);
system(startcmd.c_str());
Sleep(10*1000);
But I notice that, looks like the service (myservice in the command) actually received the SCM event several minutes after the code above is executed.
What can result in such situation? Does that means the SCM is busy and cannot response the request above timely? or what else could be the problem?
Your Sleep is 10 second . in my Idea you have a do()while some where . first kill all services . then trace your code . be suspicions about do while
I have a very basic app that plugs data into a stored procedure which in turn returns a recordset. I've been experiencing what I thought were 'timeouts'. However, I'm now no longer convinced that this is what is really happening. The reason why is that the DBA and I watched sql server spotlight to see when the stored procedure was finished processing. As soon as the procedure finished processing and returned a recordset, the ColdFusion page returned a 'timeout' error. I'm finding this to be consistent whenever the procedure takes longer than a minute. To prove this, I created a stored procedure with nothing more than this:
BEGIN
WAITFOR DELAY '00:00:45';
SELECT TOP 1000 *
FROM AnyTableName
END
If I run it for 59 seconds I get a result back in ColdFusion. If I change it to one minute:
WAITFOR DELAY '00:01';
I get a cfstoredproc timeout error. I've tried running this in different instances of ColdFusion on the same server, different databases/datasources. Now, what is strange, is that I have other procedures that run longer than a minute and return a result. I've even tried this locally on my desktop with ColdFusion 10 and get the same result. At this point, I'm out of places to look so I'm reaching out for other things to try. I've also increased the timeout in the datasource connections and that didn't help. I even tried ColdFusion 10 with the timeout attribute but no luck there either. What is consistent is that the timeout error is displayed when the query completes.
Also, I tried adding the WAITFOR in cfquery and the same result happened. It worked when set for 59 seconds, but timed out when changed to a minute. I can change the sql to select top 1 and there is no difference in the result.
Per the comments, it looks like your request timeout is set to sixty seconds.
Use cfsetting to extend your timeout to whatever you need.
<cfsetting requesttimeout = "{numberOfSeconds}">
The default timeout for all pages is 60s, you need to change this in the cfadmin if it is not enough, but most pages should not run this long.
Take some time to familiarise yourself with the cfadmin and all its settings to avoid such head scratching.
As stated use cfsetting tag to override for specific pages.
Is it possible using standard C++ in Linux to get informed when a specified date/time is reached by the system time (assuming my process is up of course)?
I could just set a timer to the time I need to wait, but what happens if the user changes the system time? Can I get informed by the system that the user changed the system time to reset my timers?
The Linux kernel has such system calls, although, they are not integrated into the libc API.
You can create a timer, get a file descriptor for it from the kernel, and do a select or epoll call on the descriptor to be notified when the timer fires.
The man page for it: http://www.kernel.org/doc/man-pages/online/pages/man2/timerfd_create.2.html
Sure, just write code to do exactly what you want. For example: You could keep a list of all such timers, the date/time they're supposed to be fired, and what code should be executed when they occur. Then every so often you could check the time to see if it's past the time any of your timers should fire. If so, fire them, remove them from the list, and go on about your business.
See the documentation for 'at' command (man at)
For example, at could send you an email at a given time, like 2:35 PM.
at 14:35
warning: commands will be executed using /bin/sh
at> mail -s "It is 2:35 PM" dbadmin < /dev/null
at><EOT> # After CTRL/D pressed.
job 9 at Tue May 8 14:35:00 2012
You can calculate the time from program start to the event, and call
sleep (difftime-1);
Then you could control if the time was reset, but this way you would only be able to correct the time to the future - if the time was set back, you would have skipped the event.
I am profiling some AS code by measuring wall clock time. In order to minimize the error I need to run the code for a long period of time. However, flash seems to protect itself from unresponsive scripts by throwing an exception after some period of unresponsiveness, namely: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
Is there any way to disable this protection, or at least extend the timeout period?
If you are publishing with Adobe Flash CS/4/5 etc.
Goto the publish settings. select "flash" at the bottom of this screen there is a textbox which says "Script Timeout" I know you can increase this, I think the limit is 90seconds even though you can enter any value here.
Can you move execution of the script across separate frames, and add a timer to advance the frame before the timeout period has lapsed? I believe the error only occurs when you've dwelled on a frame for more than 15 seconds.