Preventing the opening of another utility when one utility is already running!

Brian, twice this past week, Weather Display opened/started the same utility (such as ‘cronairquality.exe’, ‘cronweatherflow.exe’, ‘ftpupd.exe’, etc.) over and over

- on Tuesday, there were no less than 1000 of those utilities trying to run ... but the computer had run out of memory - I had to power off the computer;
- on Thursday, there were at least 100 of those utilities running - I was able to delete all of them before restarting the computer.
Is there a way for Weather Display to check if a utility is already running before starting another copy of that utility?

Note: Similar situations have happened in the past but not as bad as this past week - this is the first time that I encounter the same situation twice within a week, considering that I have not updated in the past weeks (running version 10.37S build 98).

it sounds like maybe your internet connection was down or similar and those programs got stuck and did not close
what I could do is run a check for is running and then if do a kill that program command

Brian, I did not have problem with the Internet … that I know - none of my IoT devices (ie: Amazon Echo, Samsung SmartThings Hub, Philips Hue Bridge, Hubitat Elevation Hub, etc.) reported that they were disconnected from the Internet (their respective clouds).

What I noticed thought is that there have been some problems with PurpleAir, either the data was slow to download or did not download at all - indeed, there were a lot of ‘cronairquality.exe’ opened among the utilities.

Brian, that would be great - for Weather Display to check if the utility (or program) is already running (before starting another copy of that utility) and ensure that the currently running utility is completely killed/shut-down (may I suggest the following logical strategy:

- if the current utility cannot be killed/shut-down, display an onscreen error message about the utility (and possibly make an entry into one of the log files) and prevent that utility to start again - Weather Display should be able to continue its normal operations but without said utility;
- if the current utility can be killed/shut-down (and can be verified that it has indeed been killed/shut-down), then start a new copy of the utility (an entry into one of the log files might also be a good idea)

Thank you for looking into this…

lets start with a patch for the cronpurpleair …

Whatever you say/write, boss… :wink:

try
http://www.weather-display.com/downloadfiles/weatherdisplaytest.zip

every hour any cronairquality.exe process running will be killed off (hopefully)
as a test

Test version of Weather Display installed at around 02:00 PST.

What should I check for, what signs am I looking for … other than continuously staring at the screen for hours… :sad11: :shocked!:

Brian, had a the same problem (as mentioned above) earlier today.

Fortunately, when I looked at the screen, only 4 error windows were opened, 2 error windows from the ‘ftpupd.exe’ program and 2 error windows from the ‘cronairquality2.exe’ program.

To be on the safe side, I closed the 4 windows, exited WD and restarted the computer.

I can add the cronairquality2.exe

Brian, when you write “I can add…” do you mean that you have to add code to each/every programs to check if a previous version of that program is already running?

I know, I know, I do not know anything about the code of WD, but, is it not (would it be) possible to add the ‘is-it-already-running’ code into WD just before WD calls (start running) the program?

Although there is (more likely/probably) no relationship between the code used to write WD and the code used to write PHP scripts … with PHP, it is possible to add some code to check if a PHP script is already running and prevent a second copy of that PHP script to start.

But then again, I am just a beginner programmer… :oops:

I do have some code to check what windows programs are running
which I could use
but that will not detect if that program is hung and needs to be killed off
anyway try another test update, same url as above

Brian, if the program has been started and for some reasons is hung, then, in my views, another copy of that program should not be started … unless the program can be killed … and a log entry should be done with the name of the hung program and if the hung program could be killed.

I know I seem to be asking for a lot … but I am trying to make your WD as ‘solid’ and as reliable as possible.

New version downloaded - will be installed in the nest few hours.

Well, it happened again earlier today!

There were (at least) 347 running programs: ‘cronairquality2.exe’, ‘cronopenweathermap.exe’, ‘cronpws.exe’, ‘cronwindycom.exe’, ‘ftpupd.exe’ were mostly all the programs continuously running and trying to open other versions of themselves until there was no memory left - this computer has been running without problem with 24.0GB of RAM memory for at least 5 years.

Is there anything I could check, anything I could test?

Note: I am running exactly the same weather-related programs (ie: Abyss Web Server, FWI, GRLevel3, IPTimelapse, Weather Display, and WXSIM) on another much less powerful computer (same setting for all the programs) without having all those 100s of programs ‘eating up’ all the RAM memory.

I am not sure why you are having this problem
i have not seen other reports of this happening and I have not had it happen here

I could try for a test to check if a program is running before starting a new version

Indeed, this is basically what I have been hinting/suggesting since the beginning…

I do not know why one of the two computers running WD is having this problem … the computer with the problems is the most ‘powerful’ computer (of the two weather computers ) running Windows 10 Pro version 1803 (not the latest update, but the last most reliable update) under an Intel Core i5-2500k @ 3.30 GHz CPU with 24GB RAM - the other computer (the one without problem) is also running Windows 10 Pro version 1803 under an Intel Pentium Dual Core E6600 @ 3.06 GHz CPU with 4GB RAM.

Happened again yesterday - I must have caught the problem early as I only had to close down about one hundred running programs (ie: cronairquality2.exe’, ‘cronopenweathermap.exe’, ‘cronpws.exe’, ‘cronwindycom.exe’, ‘ftpupd.exe’…).

I had hoped that after closing all those running programs I would have been able to check on the memory, but, unfortunately, no other program would run, including Windows task manager, all of them giving the same error message that there was not enough memory left to run the program. Thus, a restart of the computer was required.

I searched the Internet to find out if someone had designed a program that would allow me to shut down duplicate running programs, but, unfortunately, I found no such program.

Since there appear that there is no easy ‘cure’ to my problem, if the problem continues to regularly happen, my only solution will be to permanently close down Weather Display and my web site.

I have carefully read the descriptions of your problem, assuming that you have not yet been able to solve it, I would think of a possible culprit: Windows10 (although I have already read that another PC does not suffer from this problem).
It seems that Windows10 must be a good operating system, but in my case it has created various and very annoying problems (with Windows7 I never had this kind of problem). In my opinion, W10’s policy regarding permissions is not transparent to the user who becomes a hostage of the software he has purchased.

I can think of possible solutions:

  1. Restore the device to an earlier date
  2. Disable Windows10 updates:
    https://www.greatis.com/stopupdates10/
  3. Review the firewall settings
  4. Of course, run the programs as Administrator

Saludos desde San Sebastian (Spain)

Since there appear that there is no easy 'cure' to my problem, if the problem continues to regularly happen, my only solution will be to permanently close down Weather Display and my web site.
I have not had a chance to look at a solution yet People need to remember that I am only 1 person and there is only so many hours in the day and after answering 100's of emails and lots and lots of forum questions and then supporting multiple operating systems and hardware types etc there is actually very little time to do anything else 8O

Hello ‘kocher’ and thank you for the suggestions.

The problem with the ‘multiple opening of the same program’ has been happening once-in-a-while on both computers running Weather Display.

But, over the past two months, the problem has been happening much more often on (only) one of the computers, maybe every 3-4 days.

Both computers operate under Windows 10 Pro. Both computers have the same release (version) number: 1803. Both computers have the same Windows updates. The setting on both computers are almost the same (many of the programs/software are running at the administrator level). Both computers run almost the same programs/software - the computer with the recurring problems also runs the XAMPP server software.

Note: I have stopped the XAMPP software for a few days hoping that would solve the problem - unfortunately, the problem is/was still there, with or without XAMPP, Weather Display was still starting the same group of (weather related) programs over and over … until there was not RAM memory left to start another copy (the computer has 24.0GB of memory installed and available).

For the past two weeks, I have been experimenting with some of the features of System Scheduler Professional (from Splinterware Software Solutions). I have created multiple System Scheduler events to close, the problematic programs (ie: Weather Display, cronairquality2.exe’, ‘cronopenweathermap.exe’, ‘cronpws.exe’, ‘cronwindycom.exe’, ‘ftpupd.exe’…) at a fixed time, twice a day. Then, after a few minutes, System Scheduler restarts Weather Display. So far, over the past week, Weather Display did not have a chance to start multiple copies of the same program.

Brian, I was hoping that you could find a solution … but I was also, not expecting that an easy solution could/would be found.

Brian, I know that you are only one person trying to fulfill the demands of many users, and I know that there are more important things in your life than spending hours and hours just answering eMail messages. That is the reason I stopped reporting on the problem.

Had I not been able to circumvent the problem using the System Scheduler events, indeed, I would have stopped Weather Display and closed my weather web site … I had nothing to loose … at 72 (years old) with a ‘shorten’ patience, I have (and can find) better things to do with my life then watch over a ‘temperamental’ computer.

[quote]Si no hubiera podido eludir el problema usando los eventos del Programador del sistema, de hecho, habr