Comments (4)
You could try explicitly destroying the object by calling uset($celery).
But maybe you could try using another backend (php-amqplib instead of PECL AMQP, or vice versa) - the back end library is supposed to close connections when the script finishes execution, if it does not, it's a bug.
For details on why we're not closing connections explicitly after posting a task, see #62
from celery-php.
Thanks for your reply gjedeer ;)
Oh no, this is more simple, I traced the execution and find out this. (sorry for my awful english)
In celery.php , inside of BuildConnection function , the $this->isConnected class variable not is set to true , then in the PostTask function, in this lines...
if (!$this->isConnected) {
$this->broker_amqp->Connect($this->broker_connection);
$this->isConnected = true;
}
The script unknowns the opened connection and open another connection (two open connections now).
So, when the script ends, PECL AMQP, library close one connection, but the first (or the last i don´t know) is still open.. forever.
My solution??, in BuildConnection function, set $this->isConnected to true and works fine, obviously ;)
Thanks for your support gjedeer, and sorry for my delayed response, in this days i'm very busy...
from celery-php.
@Zeniox the latest release, 2.1.2, has fixes with regards to reusing an open Celery connection. Can you upgrade and see if you're still experiencing the same issue. If so, could you provide a minimal test script that demonstrates the buggy behavior?
from celery-php.
Closing until requested information is provided. If you can provide a minimal test script demonstrating the bug with the latest release or master branch, please reopen.
from celery-php.
Related Issues (20)
- Transport abstraction layer HOT 3
- Introduce CeleryConnectionException HOT 2
- Travis tests are installing celery 4.1 (latest), but the README says latest tested version is celery 3.1.19 HOT 2
- Is it possible to use the same Celery object for different queues HOT 1
- Missing Parameter in CONNECTING VIA SSL Example HOT 1
- How to install celery4-dev? HOT 2
- how to set timeout with connection redis or mq
- This project has plans to correspond to Amazon SQS? HOT 2
- request.retries comes in as null in the celery worker HOT 2
- Get result not working with amqp backend in Ubuntu 20.04 HOT 3
- API documentation page is blank HOT 8
- Composer warning on install: "Package videlalvaro/php-amqplib is abandoned, you should avoid using it. Use php-amqplib/php-amqplib instead." HOT 4
- How can i get var_dump HOT 10
- Port Celery4 v2 protocol to Redis and PECL-AMQP HOT 32
- celery queue always created HOT 1
- create unit test validating ETA support
- fix params/ETA support in celery4 branch HOT 1
- [help wanted] Make documentation comments work with latest PHPDocumentor HOT 1
- Packagist error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celery-php.