The attached Python program uses two command line utilities that are available with XP Pro, TASKLIST and TASKKILL.
TASKLIST returns a string containing memory usage for each process. The Python program parses out the memory usage for mgserver.exe. TASKKILL kills the mgserver.exe process. The Python program tests if the memory usage for mgserver.exe is greater than a certain limit and kills the process if it is, and then restarts the mgserver.exe process. This doesn't help the hapless user who suddenly finds that the map doesn't work, but at least the map comes back after about 10 seconds. Also we have found that, as Andy indicated earlier in this thread, the newly-released MGOS 2.0.1 does a better job managing memory. max_samart wrote: > > Hi, > I am using the following code and using the windows scheduler to > schedule the batch file. > echo MapGuide Scheduler Task Starting > taskkill /F /FI "SERVICES eq MapGuideServer1.2" > net stop MapGuideServer1.2 > net start MapGuideServer1.2 > echo MapGuide Scheduler Task Completed > > Buti am getting the System Error 109 which is the "The Pipe has been > ended", while executing net stop MapGuideServer1.2 line , kindly refer to > the attached screen shot. > Thks > Max ! > ----- Original Message ---- > From: nclayton <[EMAIL PROTECTED]> > To: mapguide-users@lists.osgeo.org > Sent: Wednesday, May 21, 2008 2:58:50 AM > Subject: Re: [mapguide-users] mgserver process hangs / memory usage > > > I'm using the batch file apporach as well. I have it scheduled to run > every 6 > hours to clear out the memory used. > > Here is the batch file I use: > ========================================================================== > taskkill /F /FI "SERVICES eq MapGuideServer2.0" > net stop MapGuideServer2.0 > net start MapGuideServer2.0 > -- > View this message in context: > http://www.nabble.com/mgserver-process-hangs---memory-usage-tp17335201p17349393.html > Sent from the MapGuide Users mailing list archive at Nabble.com. > > _______________________________________________ > mapguide-users mailing list > mapguide-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapguide-users > > > > > > _______________________________________________ > mapguide-users mailing list > mapguide-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapguide-users > > http://www.nabble.com/file/p17364311/monitorMapGuide.py monitorMapGuide.py ----- Jim O’Leary Bachelor of Technology Technical Consultant Pacific Alliance Technologies TEL 604.676.6000 EXT 110 TOL 877.691.9171 FAX 604.682.0962 WEB http://www.pat.ca/ www.pat.ca “A Member of StarDyne Technologies” http://www.stardynetech.com/ www.stardynetech.com The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this message in error, please notify us immediately by replying to this message and deleting it from your system without making a copy. Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, arrive late or contain viruses. We are not liable for the timely, proper or complete transmission of the information contained in such communications. We are also not liable for the loss of confidentiality of information contained in such communications. -- View this message in context: http://www.nabble.com/mgserver-process-hangs---memory-usage-tp17335201p17364311.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users