Is there a way to speed up recovery from a crash - calabash

I'm trying to find a way to switch Calabash to next Scenario after noticing a crash
Retrying.. HTTPClient::ReceiveTimeoutError: (execution expired)
Retrying.. HTTPClient::ReceiveTimeoutError: (execution expired)
Failing... HTTPClient::ReceiveTimeoutError
Otherwise it can take up to half an hour before Calabash reestablish connection to Simulator and starts the next Scenario.

half an hour before Calabash reestablish connection to Simulator
This is very unusual and typically indicates a problem with UIAutomation.
Have you seen the Hot Topics page? In particular:
NSLog output can cause apps to become unresponsive during testing.
My best guess is that instruments is hanging for some reason. Below, I provide details about various variables and their defaults that influence launching and connecting the Calabash server.
I don't think that adjusting any of the variables below will make an difference in your case.
Reporting Problems
In the future, please include the details found in the Report Problems section of the Calabash iOS Wiki Home Page.
Environment Variables
You can find documentation about all the Calabash iOS environment variables here.
There are several variables you can use to control how long Calabash will wait for a response.
In Calabash iOS, two things need to happen before tests can begin:
The instruments command-line tool must launch the app and respond that it has launched the app.
Calabash must establish a connection with the embedded server.
You can control how long run-loop waits for instruments to launch the app and report back using the UIA_TIMEOUT environment variable. The default is 10 seconds. Calabash tells run-loop to try 3 times, for a total of 30 seconds. Unfortunately, there are no public API docs for run-loop.
The there are two environment variables that control how long Calabash will try to establish a connection with the embedded server:
CONNECT_TIMEOUT
MAX_CONNECT_RETRY
The default is try to reconnect once every 3 seconds 10 times for a total of 30 seconds.
These two variables are also used every time a query or gesture is made - how long does Calabash wait for the server to reply.

Related

'Server Connection Error' on GCP (AI Platform Notebook)

I am facing some issues with GCP and the AI Platform (Jupyterlab)
It seems that I am unable to maintain a stable connection with the server for a long time. I keep getting those 'server connection error' message. From there two possibilities:
either nothing happens and my cell keeps running
or
the cells have stopped running and I can see the status 'No Kernel!' on the top right of the notebook. Whenever I select a kernel (python 3) again, depending on my luck I can either keep working, or the cell will display the running status (with the * on the left of it) but the kernel status on the bottom left will stay on : 'connected' (instead of 'busy'). For the latter, I need to restart the kernel and run all the cells again, which can be very long.
Sometimes this happens as soon as I run the first cell after (re)starting the instance, sometimes a bit later. The longest stable period I was able to work on the notebook without any issue was 20, 30-ish minutes, which is quite annoying.
Configuration of my main instance :
- 16 CPUs
- 60gb of RAM
- A P100 NVIDIA GPU
I have tried different types of instance and I keep having the same problem, network at home is stable.
error message
What operating system and browser are you using at work?
I had the same problem as you did on Ubuntu 18 with the Firefox browser.
When I switched to Windows with Chrome the error did not reoccur, even though it was the same network.
I had a similar issue today: according to the google docs the cause for this is that the docker/ Jupyter service is not starting.
The cause why these services couldn't be started in our specific case was a full disk.

LG TV Control through serial using Windows service runs about 30 seconds after PC is powered on - how to start the service sooner?

I have created a Windows service that turns an LG TV on/off over a USB-Serial cable when the PC powers on, resumes, or is shutdown or suspended.
The problem is that it currently takes about 30 seconds from when the PC is turned on for my service to actually start and send the appropriate command over the serial port to turn on the TV. By this time, the Windows login is already being displayed.
Is there any way to make Windows start my service sooner, say just after the USB-Serial port driver has been started? Thank you for any help!
It might be as simple as changing its name. Microsoft has a lengthy list of rules that govern what is loaded and in what order. But oddly, within a particular load group, they are loaded alphabetically of all things...
Microsoft technet social -- load documentation That's an old page but most of the rules still apply.
Get ready to tinker with the registry. Make a backup first! :)

CF Service continuously restarts every 25 seconds

After my laptop froze yesterday I rebooted, and now the ColdFusion 9 Application Server service starts and restarts endlessly! Although it's set to start automatically, upon bootup it does not start. So I start it manually. Then I look at the Windows Event Viewer which reports:
The ColdFusion 9 Application Server service for the "coldfusion" server was started. PID is 5788.
That's good. But then, about 9 seconds later, Event Viewer reports:
The ColdFusion 9 Application Server service for the "coldfusion" server is restarting.
16 seconds later, the Event Viewer reports that the service has, in fact, started again. And 9 seconds after that, it reports that the service is starting again.
Unless I manually stop the service, this cycle continues, with the CF service restarting itself every 25 seconds, give or take a second. Needless to say, I can't use ColdFusion. When I try to reach a page, I get error 500: There is no web application configured to service your request
I am running the developer edition of CF9, Windows. Computer behaves normally otherwise.
[Edit]
The coldfusion-out.log includes this:
Server coldfusion ready (startup time: 9 seconds)
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_IN_PAGE_ERROR (0xc0000006) at pc=0x6d6e2424, pid=5456, tid=7724
JRE version: 6.0_17-b04
Java VM: Java HotSpot(TM) Server VM (14.3-b01 mixed mode windows-x86 )
Problematic frame:
C [nio.dll+0x2424]
An error report file with more information is saved as:
C:\ColdFusion9\runtime\bin\hs_err_pid5456.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
The detailed error report, C:\ColdFusion9\runtime\bin\hs_err_pid5456.log, has a ton of information, but I don’t understand much of it. I’ll be happy to post it all if you think you might be able to make heads or tails of it.
In the event that the only solution is to reinstall CF, can you tell me where to find the config files? I know I will need jrun-web.xml (and I know where it is), but where, for example, are the datasource definitions found? I can’t seem to find any folder or file with the settings from the CF Admin. (The CF Admin won’t run, so I can’t view them that way.)

How to Stop A ColdFusion MX-7 Scheduled Task that has already started

I inherited a coldfusion MX7 application that has a long running process, which the user kicked by accident.
By my calculations, at the current rate, the job will run for 3 days.
There doesnt seem to be a way through the administrator interface to stop a job that is running.
The table that is being filled can be easily repopulated, so I would think stopping the coldfusion service wont effect anything except the table, which isnt a problem.
Am I right? Is that safe? Is there another way?
a one-time restart of the service should be fine. for the future, you may want to add a required url param or other such safety mechanism to keep this long process from accidentally going off.
Check to see if the task already has an explicit timeout out set
Explicit Timeout
Otherwise the default page time out is used
Server Settings
For newer versions of ColdFusion 8 and above, you can kill a running page with with the Server Monitor in the section labeled "Aborting unresponsive or troublesome requests/threads"
Using server monitor.
It also may be possible to stop the processing by killing the SQL Server Task:
Is there a task manager of sorts for SQL Server 2008 and on?

Service blocks windows startup

We have automatically started service which in some cases spends a lot of the time loading necessary data, let's say 10 minutes. During this time it works as expected (processing some huge data files required to start). I report the progess by C++ SetServiceStatus function, it is working fine.
This service is not dependent on anything and has only one dependency which is again our own service. It is started after those 10 minutes, it needs the first "server" service to be fully running to accept the requests.
I thought that windows would start all other automatic services (in less then 10 minutes as usually) and then start working normally but system is completely blocked during startup (i can't login to computer or ping the computer) until this one specific service is started (reports SERVICE_RUNNING by SetServiceStatus). When out service completely starts, the other missing system services (required for network, remote desktop, whatever, it's quite random) are also started. Is this normal behaviour? Why are non-depending processes (as remote desktop, network connections, etc.) waiting for this process? Am I missing something?
I tried to add some dependencies to postpone the startup of my service but I ended up with many dependencies and behaviour still somehow random (as order of services is random). Sometimes I was able to login but for example Start button started working only after those 10 minutes when my service was started. I am not sure what is "the last service" to depend on and what services to include to my depend-list and on some computers this services can be disabled and it can bring new problems... so I don't like this solution very much.
Another option was Delayed start option for our service. This should start service when all other automatic services are running. Well, this works fine, windows boots, computer running and responding, our service is started, but the performance is very bad, many times slower than usually, it seems that delayed started services have much lower priority or something like that.
My only current solution is to report to system that my service is running (by SetServiceStatus function), but to continue loading (this works, I tested it). But then we have problem with our dependent service as it needs to be started when the first one is really ready. It can be solved but I still wonder how is this possible and if there is something I could use to keep the current state of automatic started service which reports "started" when it is really fully started and prepared to work. Thanks for any ideas.
Set SERVICE_RUNNING as soon as possible, and then continue processing in background. Make your other service resilient to the first service being in a running state, but not yet ready to service.
The longer the service is in the starting state the more problems we get from different windows versions.