Participant Numbers and postgress connections

79 views
Skip to first unread message

Jonas

unread,
Jun 9, 2021, 11:00:53 AM6/9/21
to oTree help & discussion
On heroku, in addition to the database size and RAM the maximum nuber of connections also varies between different postgress plans. I am wondering if there is a relation between the number of otree participants and the number of postgress connections used. I vaguely remember that I had database issues with sessions that had more participants than the maximum amount of connections my heroku plan offered a couple of years ago but I tried to reproduce this with the latest version of oTree 5 and it seemed to work with more participants than the connection limmit. 

Chris @ oTree

unread,
Jun 9, 2021, 12:55:05 PM6/9/21
to Jonas, oTree help & discussion
the number of database connections is not related to the number of participants. Rather, it is related to the number of server processes. In the simplest setup, each process has 1 database connection. Now that oTree runs in a single main process, it uses fewer connections than before, when there were 3 processes that used connection pooling which further complicates things. 

In reality, there may be a few more connections active. For example there is actually a second process that runs a task queue. I haven’t confirmed this but I would expect that the new version should only use like 5 or fewer connections even when there are many participants.

Sent from my phone

On Jun 9, 2021, at 8:01 AM, Jonas <jonasf...@gmail.com> wrote:

On heroku, in addition to the database size and RAM the maximum nuber of connections also varies between different postgress plans. I am wondering if there is a relation between the number of otree participants and the number of postgress connections used. I vaguely remember that I had database issues with sessions that had more participants than the maximum amount of connections my heroku plan offered a couple of years ago but I tried to reproduce this with the latest version of oTree 5 and it seemed to work with more participants than the connection limmit. 

--
You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otree+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/otree/9503c93a-2ce6-4325-8cbe-176ce7c4e46an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages