PerlDancer / PerlDancer/Dancer2

Error mounting multiple domains

Open
#1,672 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Question
Dominant language
Perl
Stars
604
Forks
288
Avg merge
1d 5h
Merged PRs (30d)
5

Description

I have two apps build using dancer2 hosted on two different domains say foo.com and bar.com
I am loading them via a app.psgi file

builder {
    mount 'https://foo.com/'      => foo->to_app;
    mount 'https://bar.com/' => bar->to_app;
    };

Both these apps access databases foodb and bardb each

I am frequently seeing "Error 500" messages while these databases are accessed. On checking the log it is usually because foo is trying to access its tables from bardb or bar is trying to access its tables in foodb.

It looks like the configuration of one app is leaking into another. I am not sure how to debug this. Any hints?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the app.psgi mount setup and the configuration or database initialization used by both mounted apps. Reproduce requests to foo.com and bar.com while checking which database each app selects; done means each app consistently uses only its own database. The issue names no source file or test beyond app.psgi.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.