首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Heroku应用程序崩溃(H10错误)与psiturk实验

Heroku应用程序崩溃(H10错误)与psiturk实验
EN

Stack Overflow用户
提问于 2021-03-29 17:19:13
回答 2查看 80关注 0票数 0

我试着用psiturk在Heroku应用上做一个实验。我以前已经让它工作了(~2019年),但是最近(从2021年起),即使使用完全相同的代码,我也无法在Heroku上运行psiturk。

以下是我迄今所采取的一些步骤:

  • 实验在本地进行,我已经证实我可以从Heroku应用程序连接到postgres数据库。
  • 我还确认Heroku是动态绑定端口的,而不是使用config.txt中的端口。
  • 在Heroku环境中,我可以启动psiturk并打开服务器,而不会导致应用程序崩溃,但是当加载沙箱点击链接的调试时,应用程序会崩溃。

Heroku应用程序使用python和节点构建包,Procfile指向python脚本。我使用的是psiturk 2.3.11和python 3.8.8,我遵循了psiturk文档中设置配置变量的步骤。

这里是Heroku日志:

代码语言:javascript
运行
复制
2021-03-29T16:44:16.409840+00:00 app[api]: Starting process with command `bash` by user danibassettlab@gmail.com
2021-03-29T16:44:39.951733+00:00 heroku[run.7975]: State changed from starting to up
2021-03-29T16:44:40.507250+00:00 heroku[run.7975]: Awaiting client
2021-03-29T16:44:40.583037+00:00 heroku[run.7975]: Starting process with command `bash`
2021-03-29T17:04:33.678083+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/pub/ad?assignmentId=debug98GDW3&hitId=debug6JU43S&workerId=debugG38KJ9&mode=debug" host=jeni-docker-test.herokuapp.com request_id=2bdae5da-5f59-475e-8ca6-9ea9a380d5c0 fwd="70.16.141.206" dyno= connect= service= status=503 bytes= protocol=http
2021-03-29T17:04:33.870529+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=jeni-docker-test.herokuapp.com request_id=828565a0-923b-4283-b9de-17b4cf890459 fwd="70.16.141.206" dyno= connect= service= status=503 bytes= protocol=http

以及我正在使用的config.txt (删除帐户信息)

代码语言:javascript
运行
复制
[HIT Configuration]
title = Key Sequence Learning Study
description = Psychology Study in which you will learn to quickly press keys to respond to squares on the screen.
lifetime = 96
us_only = true
approve_requirement = 95
ad_group = default_network
psiturk_keywords = network
organization_name = University of Pennsylvania
browser_exclude_rule = mobile, tablet
allow_repeats = false
server_timeout = 240

[Database Parameters]
database_url = postgres:<my_database_url>
table_name = participants_tmp

[Server Parameters]
host = 0.0.0.0
port = 22362
cutoff_time = 30
logfile = server.log
loglevel = 2
debug = false
login_username = examplename
login_pw = examplepassword
threads = 1
secret_key = 'this is my secret key which is hard to guess, i should change this'

[Task Parameters]
experiment_code_version = 'behavioral_pilot_v6_delay'
num_conds = 1
num_counters = 1

[Shell Parameters]
launch_in_sandbox_mode = true
bonus_message = "Bonus for Bassett Lab Experiment. Thanks for participating!"


use_psiturk_ad_server = false
ad_location = https://jeni-docker-test.herokuapp.com/pub

崩溃发生在将任何信息记录到实验文件夹中的psiturk server.log文件之前。

对下一步有什么建议吗?

EN

Stack Overflow用户

发布于 2021-04-01 06:48:23

较新版本的SQLAlchemy删除了不推荐的方言名postgres。你必须使用postgresql。在数据库参数中,有:

代码语言:javascript
运行
复制
database_url = postgres:<my_database_url>

要解决这个问题,请将postgres://重命名为postgresql://

或者,考虑将sslmode='require'添加到数据库URL中。

票数 0
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66858715

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档