GithubHelp home page GithubHelp logo

Comments (4)

gjedeer avatar gjedeer commented on May 25, 2024

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.

Zeniox avatar Zeniox commented on May 25, 2024

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.

jdufresne avatar jdufresne commented on May 25, 2024

@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.

jdufresne avatar jdufresne commented on May 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.