added max_keepalive_requests variable to template, params and init