oTree Forum >

Heroku crashes with multiple requests?

#1 by R800377803 (edited )

I have been using a waitpage to make sure all participants stay in sync between rounds:

class SyncPage(WaitPage):
    wait_for_all_groups = True
    
However, when all players exit this page at once, the simultaneous requests crash the Heroku server. Iv'e added a count variable to separate the requests by an eighth of a second, but it is still pretty clunky, given there are 16 participants total. 

class SyncPage(WaitPage):
    wait_for_all_groups = True
    count = 0
    def before_next_page(self):
        time.sleep(self.count*.125)
        self.count = self.count + 1
        
Any suggestions?

Write a reply

Set forum username