Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Floating License making application start up slow

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Kushal



Joined: 11 May 2018
Posts: 52

PostPosted: Mon Jun 04, 2018 2:01 pm    Post subject: Floating License making application start up slow Reply with quote

Hi,

I've just started using Floating Licenses in my application! Quite happy with it, but I've noticed that my app starts up 5 to 10 seconds SLOWER than normal!

After reverting back to a local license, it starts up as normal (about 2 second).
Server speed/network speed aren't an issue (enough free resources/gigabit network/etc).
Arrow Any way of speeding this up?

Arrow Secondly, is there a way we can 'check' how many floating licenses are being used at any given time?

Thank you.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Jun 05, 2018 11:11 am    Post subject: Reply with quote

I suspect this is a networking issue of some kind (possibly fire wall related) as I haven't seen similar issue before. If you run the client on the same computer as the license server does it have the same delay? If you install the license server on a different computer does this change anything?

If you want to so how many floating licenses are in available/in use then you can add methods to the LicenseServer class to return NumFloatingLicenses and _activeLicenses.Count. You client code can then call these methods (in the same way that it calls GetLicense on the remote LicenseServer object) to get the values and display them to your user.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Kushal



Joined: 11 May 2018
Posts: 52

PostPosted: Wed Aug 15, 2018 8:32 am    Post subject: Reply with quote

Quote:
you can add methods to the LicenseServer class to return NumFloatingLicenses and _activeLicenses.Count


I can't seem to find the _activelicenses.count function. Bit more on that please. Thnx
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Aug 15, 2018 10:32 pm    Post subject: Reply with quote

It's a member variable in the LicenseServer class. Declared as below:

Code:
private List<FloatingLicense> _activeLicenses = new List<FloatingLicense>();

_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Kushal



Joined: 11 May 2018
Posts: 52

PostPosted: Sat Aug 18, 2018 10:29 am    Post subject: Reply with quote

I can't seem to access the list of _activeLicenses.
Changed it to public as well, but keeps giving 0.

any example in the code? or please, if you can, expand on the example?


Regarding startup being slow, I found where it is slow. First thing before the app runs, the license is checked, so in;
GetFloatingLicense()
Line: result = licenseServer.GetLicense(Environment.MachineName)
This is where it takes 5 to 10 seconds.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Aug 19, 2018 12:28 am    Post subject: Reply with quote

You can't just make the property public and then access it from the client. The client process has a proxy object for the LicenseServer (which is a MarshalByRefObject) which is actually inside the server process on the server machine. I think member variables on the local proxy object will always be uninitialized - so you should not try to access these directly. Instead you should add a public property which returns the count. This should be marshaled to call the corresponding property on the server objects returning the correct value. eg

Code:
private int ActiveLicenseCount
{
    get
    {
        return _activeLicenses.Count;
    }
}


With regard to the speed issue. Where is your license server running? If you install the license server on the same machine as your client (which runs fine with a local license) do you have the same delay.

What are the operating systems of the client and server machines? What version of Infralution Licensing System are you using?
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Kushal



Joined: 11 May 2018
Posts: 52

PostPosted: Mon Aug 20, 2018 7:19 am    Post subject: Reply with quote

Thanks for the advice on public property.

Regarding slow floating lic startup, if installed on the same computer as the license service, then it takes 2 seconds, rather than 5 to 8 seconds on a network PC.
If I install a local license (not floating), then it's instant startup.

Versions:
License Tracker is 6.4.1.0
DLL used in app is 6.4.0.0
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Aug 20, 2018 11:20 am    Post subject: Reply with quote

What are the operating systems that you are running on? This sounds like some form of strange networking issue. When running local on any machine I test on this runs near instantaneously. If you install the license and select the Floating license option how long does this take once you hit the OK button?
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Kushal



Joined: 11 May 2018
Posts: 52

PostPosted: Mon Aug 20, 2018 2:10 pm    Post subject: Reply with quote

License Tracker being run on Windows 10.
License Service, in my office, running on Win server 2016.

When pressing OK the the licensed app, on my PC (service is on another), closes INSTANTLY. no delays there.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Aug 21, 2018 3:19 am    Post subject: Reply with quote

When you start the program, if a floating license is selected in settings ,it will call GetFloatingLicense(serverAddress, port) which contains the line you say is taking 5 to 10 seconds to execute. When you open the license dialog it also calls this exact same method - but it executes immediately. The only difference is that the connection has been made once previously (on startup). This points to some sort of networking issue. If you configure the application as a standalone license, then restart it and switch to a floating license how long does this take when you press the OK button after selecting the server (in this case there will be no previous call to GetFloatingLicense)
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Kushal



Joined: 11 May 2018
Posts: 52

PostPosted: Fri Aug 24, 2018 2:19 pm    Post subject: Reply with quote

Seems like a windows firewall issue!!!

Thanks for helping! Sorry for the time wasting!
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sat Aug 25, 2018 12:04 am    Post subject: Reply with quote

No problem. I thought it had to be something like that.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group