I would like to use this package and when I follow the documentation and install it, everything works in its default state. However, I need to change the directory structure of the app, instead of having everything under the app
folder, I would like everything under the root
folder instead. No matter how I try to configure the application, it doesn't work. The documentation states I can change directories in the mapDirectories method, and after a dump, everything points to the right place.
This is the error I keep getting:
2022-11-12T16:27:41.731+1000 DEBUG rpc plugin was started {"address": "tcp://127.0.0.1:6001", "list of the plugins with RPC methods:": ["metrics", "jobs", "kv", "informer", "resetter"]}
[INFO] RoadRunner server started; version: 2.11.4, buildtime: 2022-10-06T14:43:01+0000
2022-11-12T16:28:41.731+1000 ERROR container/poller.go:16 vertex got an error {"id": "http.Plugin", "error": "static_pool_allocate_workers: WorkerAllocate: failed to spawn a worker, possible reasons: https://roadrunner.dev/docs/known-issues-allocate-timeout/2.x/en"}
github.com/roadrunner-server/endure/pkg/container.(*Endure).poll.func1
github.com/roadrunner-server/[email protected]/pkg/container/poller.go:16
2022-11-12T16:29:11.751+1000 ERROR container/stop.go:147 vertices which are not stopped {"id": ["logger.Plugin", "server.Plugin", "static.Plugin", "gzip.Plugin", "prometheus.Plugin", "send.Plugin", "memory.Plugin", "boltdb.Plugin", "redis.Plugin", "kv.Plugin", "memcached.Plugin", "config.Plugin"]}
github.com/roadrunner-server/endure/pkg/container.(*Endure).shutdown
github.com/roadrunner-server/[email protected]/pkg/container/stop.go:147
github.com/roadrunner-server/endure/pkg/container.(*Endure).Shutdown
github.com/roadrunner-server/[email protected]/pkg/container/endure.go:468
reflect.Value.call
reflect/value.go:584
reflect.Value.Call
reflect/value.go:368
github.com/roadrunner-server/endure/pkg/fsm.(*FSMImpl).Transition
github.com/roadrunner-server/[email protected]/pkg/fsm/fsm.go:216
github.com/roadrunner-server/endure/pkg/container.(*Endure).Stop
github.com/roadrunner-server/[email protected]/pkg/container/endure.go:340
github.com/roadrunner-server/endure/pkg/container.(*Endure).startMainThread.func1
github.com/roadrunner-server/[email protected]/pkg/container/poller.go:52
2022-11-12T16:29:11.751+1000 ERROR container/poller.go:54 error during stopping vertex {"id": "http.Plugin", "error": "endure_shutdown: Timeout: timeout exceed, some vertices may not be stopped and can cause memory leak"}
github.com/roadrunner-server/endure/pkg/container.(*Endure).startMainThread.func1
github.com/roadrunner-server/[email protected]/pkg/container/poller.go:54
error: static_pool_allocate_workers: WorkerAllocate: failed to spawn a worker, possible reasons: https://roadrunner.dev/docs/known-issues-allocate-timeout/2.x/en
plugin: http.Plugin
This is my mapDirectories()
method:
protected function mapDirectories(array $directories): array
{
if (!isset($directories['root'])) {
throw new BootException('Missing required directory `root`');
}
if (!isset($directories['app'])) {
$directories['app'] = $directories['root'] . '/';
}
$directories = \array_merge(
[ // public root
'app' => $directories['root'] . '/',
// public root
'public' => $directories['root'] . '/public/',
// vendor libraries
'vendor' => $directories['root'] . '/vendor/',
// data directories
'runtime' => $directories['root'] . '/runtime/',
'cache' => $directories['root'] . '/runtime/cache/',
// application directories
'config' => $directories['root'] . '/config/',
'resources' => $directories['root'] . '/resources/',
],
$directories
);
return $directories;
}
My folder structure:
root
|- /config
|- /locale
|- /migrations
|- /public
|- /runtime
|- /src
|- /tests
|- /vendor
|- /views
|- ...
|- .rr.yaml
|- app.php
|- composer.json
|- rr
|- ...
If I reset everything back to defaults, there are no problems. I have change no other files other than directory paths in.
help wanted