我收到如下粘贴的错误消息:
% USE_SERVER=puma bundle exec derailed exec perf:mem_over_time
Booting: production
docking_dev already exists
Endpoint: "/"
Port: 3857
Server: "puma"
[4990] Puma starting in cluster mode...
[4990] * Version 3.7.0 (ruby 2.3.3-p222), codename: Snowy Sagebrush
[4990] * Min threads: 5, max threads: 5
[4990] * Environment: production
[4990] * Process workers: 2
[4990] * Preloading application
[4990] * Listening on tcp://0.0.0.0:3000
[4990] Use Ctrl-C to stop
[4990] - Worker 0 (pid: 5013) booted, phase: 0
[4990] - Worker 1 (pid: 5014) booted, phase: 0
PID: 4990
149.67578125
Couldn't call app.
Bad request to "curl 'http://localhost:3857/' -s --fail 2>&1"
***RESPONSE***:
""
[5014] ! Detected parent died, dying
[5013] ! Detected parent died, dying我检查了RAILS_ENV=production rails server和RAILS_ENV=production rails console,它们都像预期的那样工作。我还需要检查什么才能使其正常工作。这是因为我的http://localhost:3000/ url启用了身份验证吗?我检查了一下,我把force_ssl转成了false。我查看了this的帖子,它显示没有帮助。
我也不知道为什么每次我运行它的时候,它都会随机选择一些端口,就像这个粘贴的端口是3857。但我的应用在本地使用3000端口运行。是否需要做些什么才能使它使用相同的端口3000?
附注:为什么是随机端口?我是从gem code那里知道的。
发布于 2020-10-21 20:49:44
好吧,我把它修好了。在我的例子中,当用户未登录时,根url将重定向到登录页面。所以这导致了gem的错误请求,此时它似乎无法正确地处理302。所以我把它修好了。
PATH_TO_HIT="/login" bundle exec derailed exec perf:mem_over_time是的,我还必须删除USE_SERVER=puma,因为它也会导致错误。
https://stackoverflow.com/questions/64463254
复制相似问题