    # File lib/phusion_passenger/utils.rb, line 378
            def before_handling_requests(forked, options)
                    if forked && options["analytics_logger"]
                            options["analytics_logger"].clear_connection
                    end

                    # If we were forked from a preloader process then clear or
                    # re-establish ActiveRecord database connections. This prevents
                    # child processes from concurrently accessing the same
                    # database connection handles.
                    if forked && defined?(::ActiveRecord::Base)
                            if ::ActiveRecord::Base.respond_to?(:clear_all_connections!)
                                    ::ActiveRecord::Base.clear_all_connections!
                            elsif ::ActiveRecord::Base.respond_to?(:clear_active_connections!)
                                    ::ActiveRecord::Base.clear_active_connections!
                            elsif ::ActiveRecord::Base.respond_to?(:connected?) &&
                                  ::ActiveRecord::Base.connected?
                                    ::ActiveRecord::Base.establish_connection
                            end
                    end

                    # Fire off events.
                    PhusionPassenger.call_event(:starting_worker_process, forked)
                    if options["pool_account_username"] && options["pool_account_password_base64"]
                            password = options["pool_account_password_base64"].unpack('m').first
                            PhusionPassenger.call_event(:credentials,
                                    options["pool_account_username"], password)
                    else
                            PhusionPassenger.call_event(:credentials, nil, nil)
                    end
            end