oTree Forum >

What is the right database plan for Continuous Double Auction experiment with groups of 6?

#1 by Eva

Hi everyone,

I made my very first otree project - a continuous double auction (CDA) live group trading experiment - for my master thesis. Now that I want to collect data using Heroku, I am having troubles with applications hangs --> Participants and myself could only see 'Application error' on screen for >15 minutes.

This is what my setup looked like: 
- I opened a session for 78 participants in my CDA project
- the group formation happens on a wait page after the instructions with the group_by_arrival_time and group_by_arrival_time_method functions
- participants trade within their group of 6 over 7 rounds of 80 sec each
- I used the Essential-0 database plan and one Standard 2X web dyno (updated to 4 during the session, because I thought that would help, but it did not)
- When roughly 70 people where in the session, the app started to hang for everyone and the response times jumped to 30 seconds.

--> I had to stop the session and saw that I had a lot of H12 error logs in a very short time when everything crashed, like this:

Jan 02 03:06:39 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=GET path="/p/4o5riklj/sCDA/FormTradingGroups/30" host=realpct-13822f03bc0b.herokuapp.com request_id=f6e0496e-59ae-d506-1bf7-d7f3b9cfbb26 fwd="82.17.249.77" dyno=web.2 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown
Jan 02 03:06:41 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=GET path="/p/fmj9tgfl/sCDA/FormTradingGroups/30" host=realpct-13822f03bc0b.herokuapp.com request_id=5bae0b99-a9da-42e3-81a5-3688762c6244 fwd="82.3.185.239" dyno=web.2 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown
Jan 02 03:06:41 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=GET path="/p/4u5z6ble/sCDA/FormTradingGroups/30" host=realpct-13822f03bc0b.herokuapp.com request_id=2d5024f1-9c4a-9879-a959-9e8fe8875741 fwd="51.6.38.232" dyno=web.2 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown
Jan 02 03:06:42 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=POST path="/p/a74fku89/preparation/ComprehensionPassed/24" host=realpct-13822f03bc0b.herokuapp.com request_id=bfa80e75-d27b-8388-5dc3-0d15f4d3c4ab fwd="68.134.72.102" dyno=web.2 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown
Jan 02 03:06:42 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=POST path="/p/b6l9j8kb/preparation/Privacy/2" host=realpct-13822f03bc0b.herokuapp.com request_id=6edc16ad-df49-ae69-cc44-3d63845b2994 fwd="86.128.116.218" dyno=web.2 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown
Jan 02 03:06:42 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=GET path="/p/f38at9z5/sCDA/FormTradingGroups/30" host=realpct-13822f03bc0b.herokuapp.com request_id=e7b9e3b3-b728-16a4-1b72-b222fa2aba70 fwd="74.74.136.247" dyno=web.2 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown
Jan 02 03:06:42 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=GET path="/p/8jbzf8ls/sCDA/FormTradingGroups/30" host=realpct-13822f03bc0b.herokuapp.com request_id=1dc951fa-bdd3-d065-4f3a-a17876e69342 fwd="199.19.72.35" dyno=web.1 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown
Jan 02 03:06:43 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=GET path="/p/5a7iipu0/sCDA/FormTradingGroups/30" host=realpct-13822f03bc0b.herokuapp.com request_id=6d1a788d-3ca0-6685-440a-a7061f368705 fwd="38.49.93.93" dyno=web.1 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown
Jan 02 03:06:44 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=POST path="/p/nj7h5enc/sCDA/PreMarket/34" host=realpct-13822f03bc0b.herokuapp.com request_id=5dd75342-d8ac-1311-fe74-78939b0ef575 fwd="5.69.246.220" dyno=web.2 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown
Jan 02 03:06:44 PM realpct heroku/router at=error code=H12 desc="Request timeout" method=GET path="/p/bcz9dj6k/sCDA/FormTradingGroups/30" host=realpct-13822f03bc0b.herokuapp.com request_id=364de77d-ea17-b936-5086-2001b772e127 fwd="90.50.142.140" dyno=web.1 connect=0ms service=30000ms status=503 bytes=567 protocol=http1.1 tls=true tls_version=unknown

Do these types of logs point towards a database connections exhaustion? Was the reason for the crash likely that the database plan (essential 0) was too small for the type of experiment I was trying to run? What database plan would you recommend to avoid another crash in the future? 

I would be very happy to receive some feedback (especially if you have worked with group trading experiments)! 
Thank you!

Write a reply

Set forum username