Skip to content

Trouble running FrankenPHP using Caddyfile "too many consecutive failures" #1218

Answered by 4RV1D
4RV1D asked this question in Q&A
Discussion options

You must be logged in to vote

I found another discussion with a Caddyfile config that worked, including some changes to the frankenphp-worker.php

Caddyfile

{
	admin localhost:7998

	frankenphp {
		worker public/frankenphp-worker.php 10
	}
}

:7999 {
	log {
		level info
	}

	route {
		root public
		encode zstd br gzip

		php_server {
			index frankenphp-worker.php
			resolve_root_symlink false
		}
	}
}

frankenphp-worker.php

<?php

$_ENV['APP_ENV'] = 'production';
$_ENV['APP_BASE_PATH'] = __DIR__ . '/..';
$_ENV['APP_PUBLIC_PATH'] = __DIR__;
$_ENV['LARAVEL_OCTANE'] = 1;
$_ENV['MAX_REQUESTS'] = 1000;
$_ENV['REQUEST_MAX_EXECUTION_TIME'] = 30;

require __DIR__.'/../vendor/laravel/octane/bin/frankenphp-worker.php';

Those c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 4RV1D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant