Comments (11)
Ok, I managed to recreate this issue by corrupting the config file. Can you make sure that http.workers.pool section presented? Can you post your config file sample here?
I have to add more validations for the config to track scenarios when config sections are omitted.
from roadrunner.
Ah, that makes sense. I was providing the minimal config that didn't give a validation error, assuming it would fill in default values as necessary. Here's what I had:
rpc:
enable: false
http:
enable: true
address: 0.0.0.0:8000
workers:
command: php rr-entrypoint.php
relay: pipes
uploads:
forbid: []
static:
enable: true
dir: public
forbid:
- .php
from roadrunner.
That explains :) We have slipped couple validations but I will keep this ticket open until your config given a proper error. We do not have default values for pool options, they always are custom.
Try:
rpc:
enable: false
http:
enable: true
address: 0.0.0.0:8000
workers:
command: php rr-entrypoint.php
relay: pipes
pool:
numWorkers: 4
allocateTimeout: 600000000
destroyTimeout: 600000000
uploads:
forbid: []
static:
enable: true
dir: public
forbid:
- .php
from roadrunner.
You can also write configs in json btw.
from roadrunner.
Will be included into next release #13
from roadrunner.
Adding the http.workers.pool
section appears to have fixed the crash-on-startup, but an immediately-dying worker (I made a typo and did require_once 'vendor/autoloaad.php';
) just put this in the output, which is not terribly useful for debugging:
rr_1 | time="2018-06-19T19:15:56Z" level=error msg="[http]: unable to connect to worker: unexpected response, header is missing: signal: killed"
I was only able to figure out the actual source of the issue by trying to run the worker command myself in a shell; at no point was I able to actually find the PHP error itself when served by rr
. Though to be fair, that could be due to bad php.ini
settings - I haven't poked at it a whole lot.
Having additional documentation on the config would be super valuable here. For example, I have absolutely no idea how the RPC section works or what it's supposed to accomplish.
from roadrunner.
That's weird, this has been properly tested:
I would have to take a look at this docker container and build our own version later.
from roadrunner.
@Firehed would you mind creating a ticket for that?
Having additional documentation on the config would be super valuable here. For example, I have absolutely no idea how the RPC section works or what it's supposed to accomplish.
from roadrunner.
Will do!
What are your log settings if you run php -i
? The base image I started off with has fairly dumb defaults, which could be part of the issue.
If it's relevant, my application's internal logger goes to STDOUT (which is what Docker generally wants), and the front-controller script I'm trying rr
with looks like this:
// autoload, framework setup, etc...
$relay = new Spiral\Goridge\StreamRelay(STDIN, STDOUT);
$psr7 = new Spiral\RoadRunner\PSR7Client(new Spiral\RoadRunner\Worker($relay));
while ($req = $psr7->acceptRequest()) {
try {
$response = $dispatcher->setRequest($req)->dispatch();
$psr7->respond($response);
} catch (\Throwable $e) {
$psr7->getWorker()->error((string)$e);
}
}
from roadrunner.
Try setting ini_set('display_errors', 'stderr');
in your script, rr will handle error buffer in this case and forward it to parent docker container with proper error management before that (like displaying in the log).
In some cases (fatal errors on bootload stage) php dies even before stderr can be set, running script manually php script.php
actually very solid solution to check if worker bootloads (script must be awaiting for stdin input).
from roadrunner.
Config validation issue has been resolved in 1.0.2
from roadrunner.
Related Issues (20)
- [๐ก FEATURE REQUEST]: HTTP log middleware separate configuration HOT 2
- [๐ BUG]: Region is missing from SQS endpoint URL when RR is running inside EC2 HOT 9
- [๐งน CHORE]: Rewrite multipart text values parsing algorithm
- [๐ BUG]: HTTP Queue gets too large HOT 16
- [๐ BUG]: Response status 200 instead of 500 in debug mode if php code fails HOT 4
- [๐ก FEATURE REQUEST]: Use Opentelemerty specific environment variables HOT 5
- [๐ BUG]: rabbitmq_redial error causes redial/retry logic to prematurely exit HOT 14
- [๐ก FEATURE REQUEST]: Log elapsed time always in microseconds HOT 9
- [๐ BUG]: RR cannot parse larger multipart form data HOT 6
- [๐ BUG]: unknown flag for long config options HOT 2
- [๐ BUG]: File uploads exceeding "upload_max_filesize" do not have the proper error code HOT 8
- [๐ก FEATURE REQUEST]: Temporal plugin healthcheck
- [๐ก FEATURE REQUEST]: `musl` arm64 binary `[blocked by GitHub ARM action runners]` HOT 4
- [๐ก FEATURE REQUEST]: RPC call to return all available storages HOT 4
- [๐ก FEATURE REQUEST]: Temporal: Provide some `sugar` for users to set the `Authorization` header
- [๐ BUG]: !BADKEY error on service name with dot (.) HOT 5
- [๐ก FEATURE REQUEST]: Including grpc error details in log messages
- [๐ BUG]: panic in http plugin HOT 5
- [๐ก FEATURE REQUEST]: Add support for streaming RPCs HOT 1
- [๐ BUG]: Incorrect name of the default AMQP exchange (should be 'amq.default') HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roadrunner.