amphp / postgres

Async Postgres client for PHP based on Amp.
MIT License
96 stars 20 forks source link

Prepared statement already exists #20

Closed ghost closed 5 years ago

ghost commented 5 years ago
> Amp\Postgres\QueryExecutionError: ERROR:  prepared statement "amp_fca13c924dc545addd9f67807241cb1d7b83f685" already exists
>  in /home/mtm/vendor/amphp/postgres/src/PgSqlHandle.php:397
> 

Hi! I'm getting this error, how can I fix it? Do you need other logs?

mmasiukevich commented 5 years ago

Update to the latest version. @see this issue

ghost commented 5 years ago

Thank you! <3

ghost commented 5 years ago
Amp\Postgres\QueryExecutionError: ERROR:  prepared statement "amp_fca13c924dc545addd9f67807241cb1d7b83f685" already exists
 in /home/mtm/vendor/amphp/postgres/src/PgSqlHandle.php:407
Stack trace:
#0 [internal function]: Amp\Postgres\PgSqlHandle->Amp\Postgres\{closure}()
#1 phar:///home/mtm/madeline.phar/vendor/amphp/amp/lib/Coroutine.php(76): Generator->send(Resource id #2222)
#2 phar:///home/mtm/madeline.phar/vendor/amphp/amp/lib/Internal/ResolutionQueue.php(55): Amp\Coroutine->Amp\{closure}(NULL, Resource id #2222)
#3 phar:///home/mtm/madeline.phar/vendor/amphp/amp/lib/Internal/Placeholder.php(130): Amp\Internal\ResolutionQueue->__invoke(NULL, Resource id #2222)
#4 phar:///home/mtm/madeline.phar/vendor/amphp/amp/lib/Deferred.php(45): class@anonymous->resolve(Resource id #2222)
#5 /home/mtm/vendor/amphp/postgres/src/PgSqlHandle.php(119): Amp\Deferred->resolve(Resource id #2222)
#6 /home/mtm/vendor/amphp/amp/lib/Loop/NativeDriver.php(206): Amp\Postgres\PgSqlHandle::Amp\Postgres\{closure}('ayr', Resource id #1953, NULL)
#7 /home/mtm/vendor/amphp/amp/lib/Loop/NativeDriver.php(97): Amp\Loop\NativeDriver->selectStreams(Array, Array, 0.245)
#8 /home/mtm/vendor/amphp/amp/lib/Loop/Driver.php(134): Amp\Loop\NativeDriver->dispatch(true)
#9 /home/mtm/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#10 /home/mtm/vendor/amphp/amp/lib/Loop.php(84): Amp\Loop\Driver->run()
#11 /home/mtm/vendor/amphp/amp/lib/functions.php(170): Amp\Loop::run(Object(Closure))
#12 phar:///home/mtm/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/Tools.php(203): Amp\Promise\wait(Object(danog\MadelineProto\Coroutine))
#13 phar:///home/mtm/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/APIFactory.php(192): danog\MadelineProto\APIFactory->wait(Object(danog\MadelineProto\Coroutine))
#14 phar:///home/mtm/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/APIFactory.php(158): danog\MadelineProto\APIFactory->__api_call('loop', Array)
#15 /home/mtm/start.php(128): danog\MadelineProto\APIFactory->__call('loop', Array)
#16 {main}

Next Error: Loop exceptionally stopped without resolving the promise in /home/mtm/vendor/amphp/amp/lib/functions.php:172
Stack trace:
#0 phar:///home/mtm/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/Tools.php(203): Amp\Promise\wait(Object(danog\MadelineProto\Coroutine))
#1 phar:///home/mtm/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/APIFactory.php(192): danog\MadelineProto\APIFactory->wait(Object(danog\MadelineProto\Coroutine))
#2 phar:///home/mtm/madeline.phar/vendor/danog/madelineproto/src/danog/MadelineProto/APIFactory.php(158): danog\MadelineProto\APIFactory->__api_call('loop', Array)
#3 /home/mtm/start.php(128): danog\MadelineProto\APIFactory->__call('loop', Array)
#4 {main}

Sorry, error again :C

mmasiukevich commented 5 years ago

strange, since in the latest version the prepared statements aren't cached

ghost commented 5 years ago

So... what should I do?

ghost commented 5 years ago

Mini update: now isn't creating any problem... I'll update you