|
mkuan (Programmer) |
25 Sep 01 21:01 |
Thx for your suggestion kamalsawhney.
My problem is slightly different compare to renga. My app doesn't involve complex queries. In fact, it involves 2 simple select queries. Anyway, here a description of my problem:
================================= I've a client app that's an ActiveX EXE. Another app (let's call it APP3) passes an id to my ActiveX EXE, and the ActiveX EXE would call an MTS component to fetch some data from the SQL Server and pass the data back to the ActiveX EXE. The EXE uses the data to populate a form and show it. Simple enough.
The ActiveX EXE is installed on workstations (> 50), but about 10 - 20 workstations uses it at different time. The EXE works fine for about 10 - 15 days, and one day for no apparent reason, when APP3 tried to call the EXE, it displayed a server busy dialog box (with "Switch To" and "Retry" buttons). If I tried to open up MTS Explore on the server, I couldn't. It's wouldn't open up. SQL Server was also not responding (Enterprise Manager and ISQLW wouldn't run). I had to reboot the server. As soon as I rebooted the server, I could open up MTS Explorer. When I checked the status view of the component that the EXE calls, I could see "Objects", "Activated", and "In Call" columns all had "21" in them. They were not going away. I had to shut down the package to clear it. After I cleared it, my ActiveX EXE worked fine again. However, after 10 - 15 days, the same problem would happen again. This morning, we found out one of the hard drives (RAID) on the server was faulty because the firmware on it needs to be updated. I don't if that would have anything to do with my problem. (This finding was found last week. Actually, a few days after this finding, that particular drive failed completed, and we lost some data.) =============================================
1. Dont pass object reference as parameter.....use byval and pass the parameters as value....
mkuan: I don't have object to pass.
2.dont pass collections as a parameters......
mkuan: I don't have this too.
3.release all the objects in the end.....memory leakage...
mkuan: checked.
4.always use createobject for creating the instance....and new for the packages not registered on the MTS...like ADODB
mkuan: Done this.
5.while calling a different class always use createinstance for creating the instance...
mkuan: n/a.
Min |
|