To accomplish this, a dedicated box we call the FaxPress (basically a custom XP box with a modem bank in it) interfaces with the EMR, or more to the point, the EMR's SQL backend databases (two of them, one for two separate clinics/practices). On the SQL box are four Scheduled Tasks, that run two EXE's: FaxIn and FaxOut, who's purposes should be obvious. There is a task running each EXE for each of the two EMR databases, set to run every 5 minutes.
This setup works great, for about two weeks, give or take a day. Then, at a seemingly random time, the FaxOut Scheduled Tasks will get hung. Normally the task/process will take a max of 10 seconds to run, but for some reason they will suddenly hang, and the task will never complete. The next time the Scheduled Task is set to run, it seems an instance of the task already running, and begins to fail. When this happens, eventually the FaxIn tasks will begin to fail as well, though in a different way, simply returning an error code.
At this point, it's game over. Usually no one notices that faxing is not working until an hour or so after the tasks first hang. You can manually stop the hung tasks (and see them hung in Task Manager as well), end processes, etc, and they will begin to run properly again, but never for more than 3 or 4 times, and eventually they will either hang again, or just not run properly. You can go in and manually run the EXE's (it's just running either faxin.exe or faxout.exe with a simple parameter referencing the database in question), and this seems to work, but does not solve the problem of the Scheduled Tasks failing. The only sure-fire cure is to reboot the server.
We've talked to the vendor about this a couple times, and outside of manually running the EXE's, their suggestion is always to reboot the server. Even better: they suggest that we should setup an automatic reboot of the server every week to avoid this problem. Yeah.
Now, I didn't just fall of the turnip truck here. I know Windows Servers need reboots once in a while, just because, and damned if anyone really knows why. But I'm not going to reboot a Windows Server 2008 R2 server every week because two fucking EXE's tend to hang after 14 days of operation. I'm just not; that's where I draw the fucking line. Maybe that "fix" works for Aunt Bea at the Mayberry Clinic, but not with me, dork. Your shit's retarded.
What am I looking at here? Memory leak? Just this last time is when I noticed the FaxOut.exe's were hanging in Task Manager; after a reboot last night, they are not. I can watch memory usage though and see if there's a slow climb upward (though 2008 uses like 75% of your memory by default, could be tough). It looks like I can't restart the Task Scheduler service without doing some registry hack voodoo. These damn things will literally run like clockwork every 5 minutes, around the clock, and then just bam, toast. No rhyme or reason that I can find. No other mysterious errors in the log around the same time. It's a brand new server (less than a couple months old), I don't think I have bad sectors or faulty memory or anything like that.
|< It's not you Husi, it's me | productivity >|