FTPServer seems to crash except when Control.Threa - WeOnlyDo Discussion board

FTPServer seems to crash except when Control.Threa (wodFTPServer)

by Investor, Wednesday, April 07, 2010, 19:11 (5345 days ago)

We have now done this in VB6 and VB.NET 2008 and see no rhyme or reason yet to what happens. Most often our FTPServer program disappears completely from the OS as if it had never been launched. When running from the IDE, the entire IDE will disappear as well in both VB.NET 2008 and VB6 (latest sp(6 I think)). A trace of what is going on just before the program dies has not lead to any pattern that is recognizable.

However, if we set the ActiveX object->Threads=False we have zero problems. Our server has high loads at predictable hours and during the high load hours we do not get enough throughput to service our users.

All events have been minimized to do the minimum amount of processing necessary and exit so as to not have long running events.

We need help or we will be forced to look for another solution.

Mark,

IFT Enterprises

Re: FTPServer seems to crash except when Control.T

by wodDamir, Wednesday, April 07, 2010, 19:50 (5345 days ago) @ Investor

Mark,

Can you please check which version of the component you're running? You can do so by checking Version property.

Also, Threads *SHOULD* be set to False in VB6, since VB6 doesn't support threading. Otherwise unexpected behaviour can occur.

When does this issue occur? What protocol are you using? Does the same occur if you try it with our samples?

Regards,
Damba

Re: FTPServer seems to crash except when Control.T

by Investor, Wednesday, April 07, 2010, 20:33 (5344 days ago) @ wodDamir


Can you please check which version of the component you're running? You can do so by checking Version property.

3.0.3.293


Also, Threads *SHOULD* be set to False in VB6, since VB6 doesn't support threading. Otherwise unexpected behaviour can occur.

I gathered that so basically took the VB6 code and ported to .NET. I declare the object with: Public WithEvents FtpD As wodFTPDLib.wodFTPD. Unlike the VB6 project I couldn't find a way to use the Interface instead of events in .NET.


When does this issue occur?

It doesn't follow any pattern that I can recognize.


What protocol are you using?

0-FTP only


Does the same occur if you try it with our samples?

It only occurs under high load conditions which we haven't been able to simulate in-house. To take your example and put it in our production environment would be disastrous for us as we sell investment data and have to keep tight control over who can see what.

Any suggestions?

I realize not being able to give you a reproducible case puts you in a tough spot. I understand, we have customers too :-) Thanks for any guidance you can offer us.


Re: FTPServer seems to crash except when Control.T

by wodDamir, Wednesday, April 07, 2010, 21:05 (5344 days ago) @ Investor

Mark,

To start with, can you please try the latest version?

As for using Notification interface in VB.Net, you should declare the component similiar to this:

[code] Implements wodFTPDComLib.IwodFTPDNotify
Dim FtpD As wodFTPDComLib.wodFTPDCom[/code]

and then initialize the component:

[code] FtpD = New wodFTPDComLib.wodFTPDCom
FtpD.Notification = Me[/code]

As for each notification method, I would suggest using Object Browser. You can simply c/p each method from there into your code. Method declaration will look like this:

[code] Sub ChangeDir(ByVal Owner As wodFTPDComLib.wodFTPDCom, ByVal User As wodFTPDComLib.FtpUser, ByVal RelativePath As String, ByRef ResolvedPath As String, ByRef Action As wodFTPDComLib.FtpActions) Implements Global.wodFTPDComLib.IwodFTPDNotify.ChangeDir
' body for this method must exist, even empty
End Sub

Sub Command(ByVal Owner As wodFTPDComLib.wodFTPDCom, ByVal User As wodFTPDComLib.FtpUser, ByRef CmdLine As String) Implements wodFTPDComLib.IwodFTPDNotify.Command
' body for this method must exist, even empty
End Sub[/code]

Can you try that, and check if the same persists. If the same still occurs, can you please try setting DebugFile property to point to some file on your disk? This will create a debug file, which will hopefully give us more info on what happens.

Regards,
Damba

Re: FTPServer seems to crash except when Control.T

by Investor, Wednesday, April 07, 2010, 21:15 (5344 days ago) @ wodDamir

Thanks Damba. I'll get the latest 3.0.4, switch to Interface callbacks, and try the Debug flag. I'll keep you apprised.

Mark

Re: FTPServer seems to crash except when Control.T

by Investor, Thursday, April 08, 2010, 20:11 (5344 days ago) @ Investor

Much more stable than before. I think using the Notification interface has made a huge difference. FWIW I ran a heap evaluator named GlowCode against the Event Driven WithEvents object and it found hundreds of memory leaks downloading only a few files. After switching to the Notification interface it didn't detect any memory leaks. This may be a problem with GlowCode and not your OCX, but it seems suspect. Our program did stop accepting connections after about 14 hours, but this could be a problem in our security code, which is somewhat involved.

I only had one problem. I didn't see any reference to setting a debug property. The help speaks of this as a feature, but I don't know where to go from there. Any suggestions?

Thank you so much Damba. If you'd like the Notification shell code I'd be glad to post it and save some other developer an hour or so.

Sincerely,
Mark

Re: FTPServer seems to crash except when Control.T

by woddrazen, Thursday, April 08, 2010, 20:22 (5343 days ago) @ Investor

Mark,


DebugFile Property is hidden property. So probably this is a reason why you don't see that property in list of wodFtpServer properties.

Here is example how to add DebugFile Property to your code:
[code] FtpD.DebugFile = c:\debug.txt
FtpD.Start[/code]
Drazen