Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.
civilcodePublic archive

About

Demonstrates issue with DB Proxy posted to ElixirForum

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

DbProxyIssue

Application with one GenServer doing calls to the database in synchronous mode.

See post on ElixirForum.

Installation

mix deps.get
MIX_ENV=test ecto.create # you may wish to update config/test.ex with your database config

How to reproduce the issue

Run:

while true; do mix test; done

Eventually, a GenServer error will occur. Example:

12:25:35.584 [error] GenServer DbProxyIssue.Worker terminating
** (stop) exited in: GenServer.call(#PID<0.197.0>, {:checkout, #Reference<0.0.2.1622>, true, 15000}, 5000)
    ** (EXIT) shutdown: "owner #PID<0.196.0> exited with: shutdown"
    (db_connection) lib/db_connection/ownership/proxy.ex:32: DBConnection.Ownership.Proxy.checkout/2

Work-arounds:

  • Set the pool_size to 1 in config/test.exs
  • Sleep 100ms before running the test (:timer.sleep(100) in test/support/test_case.ex)

About

Demonstrates issue with DB Proxy posted to ElixirForum

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages