WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Franais)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
WD stops opening programs (Read 5529 times)
wesman
Junior Member
**
Offline



Posts: 75
Australia
WD stops opening programs
Dec 14th, 2011 at 4:00am
 
Hi Gert

We have WatchDirectory running on one of our machines. We have 13 tasks set up in WD on this machine. One of the tasks is meant to run a BAT file when a particular file has been executed. This BAT file then executes another piece of software running on the machine. We have verified that this other software runs correctly when we execute it directly ourselves. We have set up and have successfully tested the task in the past and it has worked correctly. However, this machine is a server and is therefore not rebooted very often. It has come to our attention that WD seems to be unable to correctly execute the BAT file for our task. I imagine this may be due to resources on the server being reduced (not significantly but still noticeably) due to the length of time between reboots. However, we need to ensure that the WD task continues to function as expected.

We have also tried setting up a very basic task that "runs a program" and this does not happen either. When we check the Task History for either task, we can see that WD appears to call the program (or bat file) but the program never actually opens and WD therefore reports an application timeout after XX seconds. We have also checked the Windows Task Manager on the machine and we can see the names of the processes in the Process list of the instances of the applications that WD is calling - BUT, these programs do not seem to open successfully at all (ie they are not visible to the user and for the BAT file it never does the job that it is meant to do.)

When setting up our original task (to load the BAT file) or the test task (to load a simple program) we have set each task to Run as a Windows Service.

We have tried reinstalling the most recent official release of WD and we have also tried installing the Beta 3 release of the latest beta version. Neither of these fixes the problem.

We have also tried stopping all of the WD services and then restarting them, and this did not resolve the problem either.

It's been quite frustrating working through this given that this task seems to work fine after a reboot but then at some point along the way the WD task seems to stop being able to successfully open the program that we need it to open.

We have also tried using the Polling Method and the Fast monitoring method and neither of these helps the 3rd party program to be able to open and run successfully.

We use WD a lot and it is a wonderful piece of software, but this problem is a great concern to us. Please can you help.


Thanks


Wes Swindale
Back to top
 
 
IP Logged
 
wesman
Junior Member
**
Offline



Posts: 75
Australia
Re: WD stops opening programs
Reply #1 - Dec 14th, 2011 at 6:11am
 
Hi Gert

We have continued working with this and we have found something interesting...when we changed the task to run under the Current User, rather than as a service, the task started working correctly again. We then set it back to working as a service and it is now running properly.

So, it seems to us that stopping and restarting the service (using the WD control panel) didn't have any effect, but changing the way the task was set to start seemed to actually delete the original service, and then we then set the task back to being run as a service, the newly created service runs correctly.

Have you ever heard of something like this, where Windows services need to be deleted and then recreated (especially when the machine has run for a long time without a reboot) ? And do you know of any ways to stop this happening (other than a) a reboot of the machine and b) what I have discussed above) ?

Thanks


Wes
Back to top
 
 
IP Logged
 
Dirk
YaBB Administrator
*****
Offline



Posts: 661
South Germany
Re: WD stops opening programs
Reply #2 - Dec 14th, 2011 at 7:55am
 
Hi Wes,

under which service account did the service run? Was it "local system" or a dedicated user?

Windows has a limited number of services which can be run under the same account. I will post you later a link to that problem. That can cause those funny things.

To check if this is the reason please set up a new domain user and let the service run under this user account. Make sure this is the only service which is running under that user account. I bet you will not see the problem again with this new user account.
Back to top
 

Viele Gre / Best regards
Dirk - GdP Software

dirk [at] gdpsoftware [dot] com
http://blog-de.gdpsoftware.com
Webseite: http://www.gdpsoftware.com
WWW WWW  
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: WD stops opening programs
Reply #3 - Dec 14th, 2011 at 8:01am
 
Dirk makes an interesting point.... I am not sure what causes this problem because the issue is still there after a restart of the service, only a reboot (or recreation of the service) helps.

It sounds like some global resource limit is slowly reached.

Here is an idea you may want to try that could delay the problem....
If you divide your tasks into a few "groups", each with its own username/password for their service, maybe the global resource depletes slower (if it is "per user").

oh, Wes, I never heard of this one before....
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Dirk
YaBB Administrator
*****
Offline



Posts: 661
South Germany
Re: WD stops opening programs
Reply #4 - Dec 14th, 2011 at 8:31am
 
At one of my test systems I sometimes see something similar to what Wes was reporting. Its important to know that it is not a WatchDirectory issue, it can also happen with non-WD services. The services can be started but wont work as expected, but sometimes they also do not start properly.
The proplem is called "out of destop heap", you can read about it here:
http://blogs.msdn.com/b/ntdebugging/archive/2007/01/04/desktop-heap-overview.asp...

I am quite sure your problem is because of this, so please try first to run it as a service under a single user. If this helps you can divide the services into 2 groups of users. I cannot tell you a number of services which you can run under the same account, but it should work fine if it is a number <= 10.
Back to top
 

Viele Gre / Best regards
Dirk - GdP Software

dirk [at] gdpsoftware [dot] com
http://blog-de.gdpsoftware.com
Webseite: http://www.gdpsoftware.com
WWW WWW  
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: WD stops opening programs
Reply #5 - Dec 14th, 2011 at 8:43am
 
Actually Dirk...

That is the "StartService fails: Error Code: 1053" ( http://www.watchdirectory.net/cgi-bin/yabb2/YaBB.pl?num=1195158336 ) issue. The thing Wes describes is NOT a problem starting the service, but starting other processes from inside the service. Maybe it is related, I don't know.

The "fix" to use multiple accounts, like you describe, does indeed help for the "1053" issue and I also wonder if it helps for Wes his problem.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
wesman
Junior Member
**
Offline



Posts: 75
Australia
Re: WD stops opening programs
Reply #6 - Dec 14th, 2011 at 11:36pm
 
Many thanks Gert and Dirk - your feedback and knowledge are excellent.

I can confirm that there are indeed a large number of services running on this particular machine under the Local System account, so I agree that it must reach some sort of limit for that user, although the limit only seems to apply once the machine's resources have become reduced due to running for a fairly long time without a reboot.

Is there a way to specify using WD the credentials of the logon user for each particular service/task? Or will I have to go into the Windows Services applet and set the logon credentials for each service in there?

Many thanks again!

Wes
Back to top
 
 
IP Logged
 
Dirk
YaBB Administrator
*****
Offline



Posts: 661
South Germany
Re: WD stops opening programs
Reply #7 - Dec 15th, 2011 at 7:03am
 
Hi wes,

you need to change that in the windows service applet one by one. Note that when you recreate the service from inside WatchDirectory (e.g. by switching a task to "start normal F5" and back to "start as service") you need to do it again, because windows will use "Local System" as default user for every new service.

Please let us know if changing the service credential helps to solve this for you.
Back to top
 

Viele Gre / Best regards
Dirk - GdP Software

dirk [at] gdpsoftware [dot] com
http://blog-de.gdpsoftware.com
Webseite: http://www.gdpsoftware.com
WWW WWW  
IP Logged
 
wesman
Junior Member
**
Offline



Posts: 75
Australia
Re: WD stops opening programs
Reply #8 - Dec 15th, 2011 at 7:08am
 
Hi Gert

I have set up the service for this task using a different user's credentials. I guess I will have to wait and see if the problem recurs sometime in future. If it doesn't then I think it's probably safe to assume that this has worked, and due to resource constraints there must be some sort of maximum number of services that can be run concurrently on a Windows system.

Thanks for all of your help with this - and let's hope it helps any other WD users who may run into the same strange issue on their machines.


Cheers


Wes
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1