File Watching Service

Posted by mcds99 on 2011-06-13 11:13
Forums: PDK Support | OS: Windows x64

I've written a service that runs just fine until the server gets really busy.
VMware server, Windows Server 2008 x64 sr2
Jboss x64
PDK 6.0
Compiled on Windows XPx32 (the service runs 32bit on the server)

I used perlsvc (GUI) to compile the PERL to an executable.
The service watches a specific directory on the server for a file that is generated by the Jboss application we are running.
The service checks to be sure the file has completed growing in size and then it moves it to a folder. At that point a VBScript is generated and runs to send the file to another server using a secure file transfer application.

This service runs fine until the server gets really busy then it does not pickup the files. It is "as if" the service has stopped. In Services the service shows it is running. Stopping and Starting the service fixes the issue.

I'm using a scheduled task to stops the service every hour, waits 3 minutes and starts the service. This prevents the inevitable pager going off at 2:00 or 3:00AM.

I'm wondering if anyone knows of a cause for the service to freeze (for lack of a better term) if there is something I can add to my code to keep the service from freezing.

Thanks in advance,
Sam.