[Opensrf-commits] r2142 - in trunk/src: libopensrf perl/lib/OpenSRF (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jan 11 18:00:41 EST 2011


Author: dbs
Date: 2011-01-11 18:00:35 -0500 (Tue, 11 Jan 2011)
New Revision: 2142

Modified:
   trunk/src/libopensrf/osrf_prefork.c
   trunk/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: trunk/src/libopensrf/osrf_prefork.c
===================================================================
--- trunk/src/libopensrf/osrf_prefork.c	2011-01-11 22:59:18 UTC (rev 2141)
+++ trunk/src/libopensrf/osrf_prefork.c	2011-01-11 23:00:35 UTC (rev 2142)
@@ -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: trunk/src/perl/lib/OpenSRF/Server.pm
===================================================================
--- trunk/src/perl/lib/OpenSRF/Server.pm	2011-01-11 22:59:18 UTC (rev 2141)
+++ trunk/src/perl/lib/OpenSRF/Server.pm	2011-01-11 23:00:35 UTC (rev 2142)
@@ -129,8 +129,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