Closed Logioniz closed 9 years ago
Doesn't look like a bug to me, but patches would be welcome if you have an idea for how to handle this better.
And for the record, RaiseError=1
is currently required. http://mojolicio.us/perldoc/Mojo/Pg#options
this is still an issue when connection to pg server is closed unexpectedly, logs flooded with:
Mojo::Reactor::EV: I/O watcher failed: DBD::Pg::db pg_notifies failed: connection not open at ../lib/perl5/Mojo/Pg/Database.pm line 141
I'm sorry but we will not support RaiseError=0
.
I got same infinite loop with default options and pg_server_prepare=0
Then you did not have the same problem.
Yes, but it's closely related. Should I open separate issue?
This problem still exists.
Options
{ 'AutoInactiveDestroy' => 1, 'AutoCommit' => 1, 'RaiseError' => 1, 'PrintWarn' => 0, 'PrintError' => 0 };
Mojo::Reactor::Poll: I/O watcher failed: DBD::Pg::db pg_notifies failed: connection not open at /usr/local/library/perl/lib/perl5/Mojo/Pg/Database.pm line 140.
Endless loop using 100% cpu
@kobaz
Are you using the latest version of the Mojo::Pg module ?
The subroutine containing the error line in question should like this. If not please upgrade to the latest version(4.27).
sub _notifications { my $self = shift;
my $dbh = $self->dbh; my $n; return undef unless $n = eval { $dbh->pg_notifies }; while ($n) { $self->emit(notification => @$n); $n = eval { $dbh->pg_notifies }; }
return 1; }
This was 4.19. We will retry with 4.27.
Thanks.
After running test have error in console if use pubsub