[Opensrf-commits] r2175 - in branches/rel_2_0/src: libopensrf perl/lib/OpenSRF (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Feb 22 13:01:05 EST 2011


Author: dbs
Date: 2011-02-22 13:01:01 -0500 (Tue, 22 Feb 2011)
New Revision: 2175

Modified:
   branches/rel_2_0/src/libopensrf/osrf_prefork.c
   branches/rel_2_0/src/perl/lib/OpenSRF/Server.pm
Log:
Add hints to increase max_children config variable if we're hitting the maximum

Already added this hint to the Python implementation, now propagating to
C and Perl.


Modified: branches/rel_2_0/src/libopensrf/osrf_prefork.c
===================================================================
--- branches/rel_2_0/src/libopensrf/osrf_prefork.c	2011-02-22 17:58:54 UTC (rev 2174)
+++ branches/rel_2_0/src/libopensrf/osrf_prefork.c	2011-02-22 18:01:01 UTC (rev 2175)
@@ -797,10 +797,14 @@
 							honored = 1;
 						}
 					}
+			} else {
+				osrfLogWarning( OSRF_LOG_MARK, "Could not launch a new child as %d children "
+                    "were already running; consider increasing max_children for this "
+                    "application higher than %d in the OpenSRF configuration if this "
+                    "message occurs frequently",
+                    forker->current_num_children, forker->max_children );
+            }
 
-				}
-			}
-
 			if( !honored ) {
 				osrfLogWarning( OSRF_LOG_MARK, "No children available, waiting..." );
 				if( check_children( forker, 1 ) >= 0 ) {

Modified: branches/rel_2_0/src/perl/lib/OpenSRF/Server.pm
===================================================================
--- branches/rel_2_0/src/perl/lib/OpenSRF/Server.pm	2011-02-22 17:58:54 UTC (rev 2174)
+++ branches/rel_2_0/src/perl/lib/OpenSRF/Server.pm	2011-02-22 18:01:01 UTC (rev 2175)
@@ -130,8 +130,9 @@
                 $self->write_child($self->spawn_child(1), $msg);
 
             } else {
-
-                $logger->warn("server: no children available, waiting...");
+                $logger->warn("server: no children available, waiting... consider increasing " .
+                    "max_children for this application higher than $self->{max_children} ".
+                    "in the OpenSRF configuration if this message occurs frequently");
                 $self->check_status(1); # block until child is available
 
                 my $child = pop(@{$self->{idle_list}});



More information about the opensrf-commits mailing list