Re: serviceRemoved / serviceAdded problem
Francisco Dário Mourão <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
Sorry Vinod, I apologize for my dummy error... The reggie configuration has the parameter minMaxServiceLease = 30000 (30 secs). I removed this configuration (thus using default = 1000*60*5 = 5 mins) and now the leases renew every 4'20'' approximately. According to the API... -minMaxServiceLease- Description: Specifies the lower bound for the maximum value allowed for service leases, in milliseconds. The maximum service lease granted is never less than the specified value, but may be greater than it if the expected average time between lease renewals (based on the current number of service and event registrations) would be less than the value of the minRenewalInterval configuration entry. This entry replaces in function the setMinMaxServiceLease method of the RegistrarAdmin interface supported by previous implementations of Reggie, and is obtained at service start and restart. ...is it me or this is a bit confusing... the min for maximum lease... what about the minimum lease? How can I specify the min for the minimum lease? Anyway... with the renewals every 4:20 secs my application won't be so sensitive to a short (say 10 secs) peek of cpu load if that's what's causing the problem. I could have problems making calls between the services during that time, but at least the application won't have the overhead of re-registering and reconfiguring (at business level) the services. On the other hand, if a service comes down that notification may take 4:20 secs... but since all services run in the same machine... About the questions you have asked me: No. Every LeaseRenewalManagers and TaskManagers are different instances. I'll try this configuration in a production environment for a few days. Thanx for the help Regards Francisco Mourão > -----Original Message----- > From: Vinod Johnson - Sun Microsystems [mailto:[email protected]] > Sent: sexta-feira, 19 de Janeiro de 2007 15:57 > To: [email protected] > Subject: Re: serviceRemoved / serviceAdded problem > > Francisco Dário Mourão wrote: > > Hi, > > > > I followed Vinod's suggestion: > > > > In this example I have 13 services in the same virtual machine which > interact with each other. > > > > While everything is running fine this sequence of logs appears every 15 > secs: <normal_sequence.txt> > > It seems that the reggie is renewing all the services 15 in 15 secs. > > Q1: How can I customize this? Say 60 in 60 secs... with config parameter > com.sun.jini.reggie minRenewalInterval ? > > > > > You can increase this value to influence the length of leases that > reggie hands out. Somebody else could explain, but it is a little > surprising to me why some of your services (7 of them it appears from > the log) try to renew their lease 15 seconds later (I would've thought > it should be longer - assuming of course that you are using default > settings for reggie). Perhaps it has something to do with recalculating > lease durations when several registrations are in progress initially, > but thats just a really wild guess at this point. > > Leaving that aside, one guess about the behavior you are seeing is that > your LeaseRenewalManager instances are not getting enough tasks to do > their jobs in a timely manner. Is your configuration such that your > discovery/join utilities are using the same LeaseRenewalManager instance > or your LRMs use the same underlying task manager instance? Do the task > manager(s) have enough threads to match your concurrency requirements? > > Few moments later, the log shows this > > > > Jan 19, 2007 4:04:42 AM > com.sun.jini.reggie.RegistrarImpl$ServiceExpireThread run > > FINE: expired service registration 8af29995-a34b-4685-9bd4-578bdc5179f8 > > Jan 19, 2007 4:04:46 AM > com.sun.jini.reggie.RegistrarImpl$ServiceExpireThread run > > FINE: expired service registration 859330b6-7b87-4c53-b05a-a925db41a0e0 > > > > Two services have expired... > > Q2: Why??? > > It seems that the renewal failed to execute the last iteration, because > there is a few seconds gap in the log (see <all_sequence.txt>)... > > Q2.1: If so, how can that happen? > > > > Then some net.jini.core.lease.UnknownLeaseException occur > (<error.txt>)... probably trying to renew the leases expired... > > Q4: right? > > > > > Would appear so. > > Q5: I have net.jini.lease.LeaseRenewalManager.level = FINEST in my > logging.properties file. LeaseRenewalManager (with default settings) is > also used by ServiceDiscoveryManager in my client services in order to > create the LookupCache. How come I don't see those renewals in my log? > > > > > Perhaps it hasn't as yet needed/got the chance to renew? > > Thanx for any help > > Francisco Mourão > > > > > > > -- > - vinod > > -------------------------------------------------------------------------- > Getting Started: http://www.jini.org/wiki/Category:Getting_Started > Community Web Site: http://jini.org > jini-users Archive: http://archives.java.sun.com/archives/jini-users.html > Unsubscribing: email "signoff JINI-USERS" to [email protected] -------------------------------------------------------------------------- Getting Started: http://www.jini.org/wiki/Category:Getting_Started Community Web Site: http://jini.org jini-users Archive: http://archives.java.sun.com/archives/jini-users.html Unsubscribing: email "signoff JINI-USERS" to [email protected]