Internal Server Error Heroku

954 views
Skip to first unread message

Dominik Beck

unread,
Jul 11, 2021, 4:53:02 AM7/11/21
to oTree help & discussion

Dear Chris,

 

currently, I am programming my experiment on otree applying livepages to see the interaction between two players in real time: https://chain-store-game.herokuapp.com/

 

The page is refreshed every second to update the payoffs.

 

On the devserver it works without any problem, however, loading the experiment on Heroku, there is an “internal server error”.

 

Have you seen this bug in the past? Do you know how to solve this?

 

 

Below, I provide you the snippet with the log file from Heroku showing the bug. I already made you collaborator in the Heroku-App if you need to watch necessary issues.

 

2021-07-11T08:32:48.819459+00:00 app[web.1]: [parameters: {'game_started': True, 'last_payout_update': 1625992368797903020, 'auction_timeout': 1625992428.797947, 'livepages_group_id': 1}]

2021-07-11T08:32:48.819459+00:00 app[web.1]: (Background on this error at: http://sqlalche.me/e/13/9h9h) (Background on this error at: http://sqlalche.me/e/13/7s2a)

2021-07-11T08:32:48.819695+00:00 app[web.1]: INFO:     46.223.163.170:0 - "GET /p/y0am7pvo/dollar_auction/WaitToStart/2 HTTP/1.1" 500 Internal Server Error

2021-07-11T08:32:48.823483+00:00 heroku[router]: at=info method=GET path="/p/y0am7pvo/dollar_auction/WaitToStart/2" host=chain-store-game.herokuapp.com request_id=4fe4ba14-c3a5-4555-9d52-39a686451a65 fwd="46.223.163.170" dyno=web.1 connect=0ms service=52ms status=500 bytes=212 protocol=https

 

I would really much appreciate your help and thank you very much in advance.

 

Best regards and have a great start into the week

 

Dominik

 

Livepages.otreezip

Chris @ oTree

unread,
Jul 11, 2021, 11:46:24 AM7/11/21
to oTree help & discussion
I haven't seen the full error, but are you caused by storing a JavaScript timestamp into an IntegerField/FloatField? That will cause an error because JavaScript timestamps are such big numbers that they exceed postgres's range for numeric fields. Better to store it in a StringField or somehow round/truncate it before storing into an IntegerField.
Message has been deleted

Chris @ oTree

unread,
Aug 26, 2021, 6:51:38 PM8/26/21
to oTree help & discussion
Update: it seems using a FloatField instead of an IntegerField solves this problem, because FloatField can store much larger numbers.
Reply all
Reply to author
Forward
0 new messages