Closed akarelas closed 3 years ago
This is @jberger 's area, probably best if he takes a look first.
Doing a binary search over commits of Mojo::Pg which fail or pass the above test, I found that the mojo-pg commit that breaks the above test is d51e252b157bc05928d92a85f1b92be23626d590 which resides between Mojo::Pg versions 4.13 and 4.14.
Everything after that breaks the test, whereas previous versions of Mojo::Pg pass the test.
Also, the first version of Mojolicious that implemented subprocess's run_p method (v8.38), also failed the test when run against d51e252.
This seems to be a duplicate of #68.
Steps to reproduce the behavior
When EV is installed and many (10 here) listening processes NOTIFY together at the same time, disconnections from the database occur very often (in this example, many disconnections per second).
The disconnects do not occur when running with
MOJO_REACTOR=Mojo::Reactor::Poll
.EV
,Mojolicious
andMojo::Pg
TEST_ONLINE
environment variable to the PostgreSQL connection stringdisconnects.t
):I had to make the unit test fork, because without forking the test would pass without errors.
Expected behavior
Output should be:
Actual behavior
Output was (after two seconds):