My app does not work on Heroku but it works locally, do I need a worker?

The buttons “Run Needleman-Wunsch” and “Run Smith-Waterman” should give output after following instructions to get two sequences from the NCBI database or uploading them to the Entrez page.

I opened an issue on Biopython Github here: Edited: Use pairwise aligner if pickling for Python RQ, not pairwise2 · Issue #3607 · biopython/biopython · GitHub

I’m wondering if I need a worker for the alignment methods which are called like this:

alignments = pairwise2.align.globalds(seq1, seq2, self.matrix,
                                              self.gap_open, self.gap_extend,


alignments = pairwise2.align.localds(seq1, seq2, self.matrix,
                                              self.gap_open, self.gap_extend)

They are fairly heavy duty dynamic programming methods for sequence alignments that can take a while depending on complexity and length of sequences involved.

Do I need to allocate a worker on Heroku?

My Heroku logs show it’s timing out on those method calls but why?

2021-06-09T21:34:36.242086+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/_dash-update-component" request_id=20d65242-8af7-4c54-9b9d-1f3e842385dc fwd="" dyno=web.1 connect=2ms service=30000ms status=503 bytes=0 protocol=https
2021-06-09T21:34:36.560751+00:00 app[web.1]: [2021-06-09 21:34:36 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:9)
2021-06-09T21:34:37.592599+00:00 app[web.1]: [2021-06-09 21:34:37 +0000] [39] [INFO] Booting worker with pid: 39
2021-06-09T21:35:26.689465+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/_dash-update-component" request_id=5312b37f-109d-4efb-8117-a3b6eb873922 fwd="" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
2021-06-09T21:35:26.809748+00:00 app[web.1]: [2021-06-09 21:35:26 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:10)
2021-06-09T21:35:27.864494+00:00 app[web.1]: [2021-06-09 21:35:27 +0000] [54] [INFO] Booting worker with pid: 54

Yes, a worker using Python RQ solved it.

Please refer here GitHub - nyck33/bio_pam_blosum