Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exe on server stops working until clicked on
Message
From
24/10/2003 03:08:13
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00841628
Message ID:
00841963
Views:
18
>Hi folks. I have an tiny exe (VFP8 SP1) that runs on our Windows 2000 webserver. This exe reads a table, which represents a queue of reports to be run. There are three identical exes that run reports in different folders. Every once in a while (it may take weeks), one of the exes will stop reading from the VFP table. If I sign into the server with PCAnywhere and click on the application (each has tiny form) the application starts reading requests from the table again. Any ideas why this might be happening?
>
>If needed, here is my code.
>
>
>DO WHILE .T. && always run
>	DOEVENTS && allow person to shut down report server
>	=Sleep(500) && sleep for .5 of a second to allow server CPU to server other requests
>	DOEVENTS && allow person to shut down report server
>
>	* checks queue for new items added
>	* go to next request in queue that hasn't be started
>	SELECT reportq
>	SET ORDER TO id
>	
>	* force use to see new records by locking and unlocking
>	IF RLOCK('0', 'reportq') then
>   		UNLOCK RECORD 0 in reportq
>	ENDIF
>
>	LOCATE FOR reportq.started = {}
>	IF FOUND() = .T. && pending reports
>		* execute report
>		oRep = CREATEOBJECT("reportmaker")
>		? TTOC(DATETIME()) + ": " + reportq.repcomm
>		REPLACE reportq.started WITH DATETIME()
>		lcCommand = reportq.repcomm
>		lcXML1 = reportq.xml1
>		lcXML2 = reportq.xml2
>		lcResult = &lcCommand
>		RELEASE oRep
>		* upon completion writes report path and file name or message to queue
>		SELECT reportq
>		REPLACE reportq.result WITH lcResult
>		REPLACE reportq.finished WITH DATETIME()
>		? TTOC(DATETIME()) + ": " + reportq.result
>		RELEASE oRep
>		lcResult = "" && blank out for next time
>		lcCommand = "" && blank out for next time
>		lcXML1 = ""
>		lcXML2 = ""
>	ENDIF
>ENDDO
>
>
Have you included memory management via SYS(3050) / SYS(1104)? Might you have a memory leak that's only manifesting itself after a very long period of time?
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform