Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-07-2004
nsns nsns is offline
Registered User
 
 
Join Date: Jul 2004
Location: Padova, Italy
Posts: 36
timeout

Hi,

could I ask to clarify how timeouts work.
I wrote a small test in which the client calls a server method (Linux, gcc 3.2.3).
On the client side (implemented via Ice::Application) I set up the timeout of 2 sec.
The server method contains 'sleep(20)' to sleep 20 sec.
When I run the client I do get the Ice::TimeoutException in 2 sec but
after this the program hangs up and doesn't respond even on Ctrl-C during
remaining 18 sec. Is it intended behaviour ?
How can I force the client to exit ?

Thanks, Nikolai
Reply With Quote
  #2 (permalink)  
Old 10-07-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Try increasing the number of threads in the server side thread pool (e.g., Ice.Server.ThreadPool.Size=2). By default, it's just one thread, and in your case, this thread hangs in the 20-seconds sleep, so no other thread is available to react to the close connection message from the client.

You can also forcefully kill the client with ctrl-c, but then you cannot use the Application helper class. The Application helper class does a graceful shutdown upon ctrl-c, meaning that it will wait until the server reacts to the connection closure request.
Reply With Quote
  #3 (permalink)  
Old 10-08-2004
nsns nsns is offline
Registered User
 
 
Join Date: Jul 2004
Location: Padova, Italy
Posts: 36
Hi Marc,

thanks, your advice to increase the server side thread pool helped.
Although not exactly as you recommended.
My server is implemented as Ice::Service and when I set 'Ice.ThreadPool.Server.Size=2'
('Ice.Server.ThreadPool.Size' was a mistyping)
I got the flollowing message:

warning: thread pool 'Ice.ThreadPool.Server' is running low on threads
Size=2, SizeMax=2, SizeWarn=1

So, I decided that Ice::Service already runs more than one thread and increased
Ice.ThreadPool.Server.Size significantly. It helped.

Two more questions:
1. What is the default number of threads for Ice::Service ?
2. What's the meaning of the parameters returned in the above warning message ?
In particular, how 'SizeWarn' is calculated ?
This parameter is important for me because I can estimate the load of my server and want to set
a reasonable value to SizeWarn, but I can do it for 'SizeMax' only.

Cheers, Nikolai
Reply With Quote
  #4 (permalink)  
Old 10-08-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Please have a look at the Ice manual, chapter "C.6 Ice Thread Pool Properties". This should answer all your questions about thread pool properties.
Reply With Quote
  #5 (permalink)  
Old 10-08-2004
nsns nsns is offline
Registered User
 
 
Join Date: Jul 2004
Location: Padova, Italy
Posts: 36
Sorry, Marc, just before getting the reply from you I found the answer on my second question
in the Manual.
Thanks, Nikolai
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ice.Override.Timeout / ice_timeout() mario Help Center 3 04-23-2008 03:23 AM
is there a timeout during checkedCast? leya Help Center 9 09-05-2006 08:45 AM
response timeout? David Help Center 3 06-21-2006 05:03 AM
Icepack registry "TimeOut" exception with heavy load eaglecn Help Center 1 05-26-2006 01:02 AM
idle timeout and IceSSL nsns Bug Reports 7 01-26-2005 04:41 AM


All times are GMT -4. The time now is 04:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.