use strict;
use constant DEBUG => 0; # Enable much runtime information.
-use constant MAX_PROCESSES => 4; # Total server process count. XXX conf to increase per-different daemon for busy sites using this (currently the only things using this are freeside-xmlrpcd and freeside-selfservice-xmlrpcd)
+use constant MAX_PROCESSES => 10; # Total server process count. XXX conf to increase per-different daemon for busy sites using this (currently the only things using this are freeside-xmlrpcd and freeside-selfservice-xmlrpcd)
#use constant TESTING_CHURN => 0; # Randomly test process respawning.
use vars qw( @EXPORT_OK $FREESIDE_LOG $SERVER_PORT $user $handle_request );
$ENV{HOME} = (getpwuid($>))[7]; #for ssh
warn "connecting to database\n" if $DEBUG;
-#$@ = 'not connected';
-#while ( $@ ) {
-# eval { adminsuidsetup $user; };
-# if ( $@ ) {
-# warn $@;
-# warn "sleeping for reconnect...\n";
-# sleep 5;
-# }
-#}
-adminsuidsetup $user;
+$@ = 'not connected';
+while ( $@ ) {
+ eval { adminsuidsetup $user; };
+ if ( $@ ) {
+ warn $@;
+ warn "sleeping for reconnect...\n";
+ sleep 5;
+ }
+}
my $log = FS::Log->new('queue');
logfile( "%%%FREESIDE_LOG%%%/queuelog.". $FS::UID::datasrc );