Giter Club home page Giter Club logo

Comments (13)

gjedeer avatar gjedeer commented on June 28, 2024

Do you have any tips on reproducing this problem? I'm running this code in production for months and had no such issues.

from celery-php.

syphernl avatar syphernl commented on June 28, 2024

I'm not sure what causes this but it only happens when the results are sent via AMQP. The results are set to JSON as instructed.

I'm using the latest RabbitMQ from their website on Ubuntu 11.10 with the latest pecl amqp module.

from celery-php.

gjedeer avatar gjedeer commented on June 28, 2024

I have googled this error and found this thread:

https://groups.google.com/forum/#!msg/celery-users/LhR5oDEWWqg/rK0fugcF76QJ

they have identified both a temporary fix that you may want to use and a
cause, which I will try to fix given some free time.

from celery-php.

syphernl avatar syphernl commented on June 28, 2024

I've found the same but that case does not apply since its a one-node rabbit-mq + celery setup.
The suggested expires has no effect on the error unfortunately.

When I use a SQLAlchemy results backend or simply not query for status trough this library it "works", but still weird that an easy out-of-the-box setup is already showing these issues.

from celery-php.

gjedeer avatar gjedeer commented on June 28, 2024

Out-of-the-box setup is failing because Celery changed their protocol from 2.3 to 2.4, and apparently nobody tested the library with 2.4 before you.

I know how to fix it, but the AMQP extension from PECL doesn't support sending arbitrary arguments when declaring a queue. Unfortunately this is required for supporting Celery 2.4. The lead maintainer of pecl extension seems to be working on that:
http://old.nabble.com/Queue.declare-arguments-td32629218.html

I'll ask him how it's going.

from celery-php.

frutik avatar frutik commented on June 28, 2024

Hi GDR!

Looks like celery-php is completely incompatible with recent version of php-amqp.

root@dev:/tmp# php test.php
PHP Warning: AMQPExchange::__construct() expects exactly 1 parameter, 2 given in /tmp/celery.php on line 86
Segmentation fault

From docs on php.net

public AMQPExchange::__construct ( AMQPChannel $amqp_channel )

from celery-php.

gjedeer avatar gjedeer commented on June 28, 2024

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew,

I need to publish a branch that works with php-amqp 1.0.0. It's ready
but not tested too much. I will do it in the next days.

Unfortunately it will not solve the original problem with Celery 2.6 too.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPXaN4AAoJEOvaa5dO09K3DvYQAMKlc1VNOoP8XzRbQRn70Gga
cd7RT0LBcyEcDp/w32IGjXeLGWXei7duxmJcaVDDqSLedMAooL/r5aHygVb7PcpX
7OhkQdWC+AAr/uMK9aVww/YgRwxXO6nJLiCSXGjgf6n2+9fqjGoxHp9xQUl9KqWH
XSZiCPD4/v1I+E/RxH0UcXmzUstY/sG7ZSz0/N0Hf0JXomxiO5KxKrE8i1QJHHXm
TTurf4R807Pt9ghzuTGWfcH6ZlfeSWujcxmtgA1Na/I751dxuja/X7h2hh+jRasw
QDQPmbY7fyYeiZeoZRls1q+z4uo6fqZtrh2AAftH8tDPZRNE5Yz9SYf7MRAv7Heg
B513/IR0hwOGBjJgX7vRL/UzrUi9ZMdEiefU4nB+svO1psMYagIZfeH/PeGK3gNj
XnvCH/DApXIuy/7Pf/n+EZyOgdYoiK6jCwiGPrNQQONG0aDb7m1HWt4BVjrSNhlG
JGctMPusOWH9at0qE7+LkcitvwacuLQBJJ4HBQidc+zmRmycvY8ESBDadbPe2j8b
gc1qYcPsKHahsCl8SfDNC6nK4ehOjJXtgAbLDH/p+nkH4uefMr+GZQvSrLt7bncD
h1umjuRh4QMT8w396zgGtIt/gPVEF1zRHCMM7wUf+Q7Bk42DdJHMFwvla2y19Cus
GtFP4VWMlYBoY9aaFMe+
=PGvm
-----END PGP SIGNATURE-----

from celery-php.

frutik avatar frutik commented on June 28, 2024

Dziękuję bardzo!

Unfortunately it will not solve the original problem with Celery 2.6 too.

IMO, not a big deal! I think it is not a big problem to install old compatible version of celery with pip. Much more problems (at least for me) to install some old stuff with pecl.

So, looking forward for new version and thanks alot for your work.

from celery-php.

gjedeer avatar gjedeer commented on June 28, 2024

frutik - #4 - I'd like to see your input.

from celery-php.

gjedeer avatar gjedeer commented on June 28, 2024

More info about 2.4 compatibility - PHP-AMQP v 1.0.0+ supports arguments but gives them a type incompatible with Celery (int vs long). PHP-AMQP author isn't going to fix it anytime soon, I'll ask Celery developers if there's something they can do.

from celery-php.

gjedeer avatar gjedeer commented on June 28, 2024

The solution to make it work with newer Celery versions was to add the following line to celeryconfig.py:

CELERY_TASK_RESULT_EXPIRES = None

If you have a working celery installation, you may have to delete vhost from rabbitmq and create it again.

Issue solved thanks to Ask Solem Hoel https://github.com/ask/celery/issues/642#issuecomment-4574077

from celery-php.

gjedeer avatar gjedeer commented on June 28, 2024

Note - the unit tests have passed for Celery 2.5.1 with forementioned setting.

from celery-php.

skysbird avatar skysbird commented on June 28, 2024

i've add some feature to support x-expire to keep consistent with python-celeryd's config

skysbird@d86f3cc

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.