2010-3-31

01:07 ed1t
how do u delete a task in celery?
01:26 rick_h_
ed1t: what I've done is have the task check if it's been 'cancelled' against some system (in my case a mysql table)
01:26 rick_h_
and if so it creates just returns and doesn't so the work
09:48 asksol
there's also celery.task.control.revoke(task_id)
15:34 djangeek
Hi Everyone
15:34 djangeek
my celery gets unusable. I explain:
15:34 djangeek
I have tasks which emit more tasks (which subsequently emit even more tasks).
15:35 djangeek
They are collecting data and updating a database.
15:35 djangeek
I don't expect any results/output from these tasks. So, fire-and-forget
15:36 djangeek
In approx. 20-24 hours it just gets stalled. 100% cpu, zombie python celeryd processes.
15:36 djangeek
Should I remember all the task IDs, store them somewhere and revoke them later on?
15:37 djangeek
I want them disappear forever after job is done (or failed).
15:37 djangeek
How do I auto-cleanup?
15:40 djangeek
Does not matter which result backend I use.... always the same... v1.0.1.
19:02 eric6rm
Hi. I'm running celeryd with manage.py in Django and I'm currently developing, so I need to restart celeryd occassionally. I was wondering what the best way to kill the service is. I read online that there should be a *.pid file that is created in the directory that holds the pid I need to kill the process but I do not get such a file. Any ideas?
22:40 gpmidi_wrk
There is a long delay (20-30 seconds) between the time Celery picks up a job and when it starts running it. How do I remove this delay?
23:13 asksol
that doesn't sound right
23:19 asksol
should take far less than a second
23:19 asksol
does it have an eta?
23:23 gpmidi_wrk
asksol: eta?
23:23 asksol
you can set the time for when after the task should execute
23:23 asksol
countdown/eta
23:23 gpmidi_wrk
shouldn't, using defaults
23:24 asksol
rabbitmq?
23:24 gpmidi_wrk
yup
23:32 asksol
that's not normal at all
23:32 gpmidi_wrk
:(
23:32 gpmidi_wrk
ideas?
23:33 asksol
it doesn't say anything about eta in the log message?
23:33 gpmidi_wrk
nope
23:33 gpmidi_wrk
i'll go double check
23:33 asksol
try the demoproject in examples/python
23:34 gpmidi_wrk
[2010-03-31 18:36:12,745: INFO/MainProcess] Got task from broker: xxxx[a99bc317-7bd4-4cff-955f-672d3d4271d1]
23:34 gpmidi_wrk
[2010-03-31 18:37:10,629: INFO/MainProcess] Task xxxx[a99bc317-7bd4-4cff-955f-672d3d4271d1] processed: [....
23:35 gpmidi_wrk
can't easily run the demo project
23:37 harel_
hi guys
23:37 harel_
anyone knows how to control which user celery runs at?
23:37 harel_
the debian init.d suggests a var CELERYD_USER
23:37 harel_
but should that be a env var or one in settings.py?
23:38 gpmidi_wrk
perhaps the init scripts?
23:38 harel_
yes that's a straight forward place for it
23:38 harel_
but is that the accepted way
23:38 harel_
?
23:39 gpmidi_wrk
i don't know; new to celery myself, but I suspect that it is since that init script and general user control is spesfic to debian
23:42 harel_
if i set CELERYD_USER="user" it won't start
23:42 gpmidi_wrk
you created a user called user?
23:46 asksol
gpmidi_wrk: try to run with --loglevel=DEBUG
23:46 gpmidi_wrk
trying...
23:46 asksol
then you can see how fast it's sent to the pool
23:47 asksol
maybe the task itself is slow
23:47 asksol
or the pool is the culprit
23:48 gpmidi_wrk
the job should take 5s max
23:48 gpmidi_wrk
it's a very quick sql query
23:51 gpmidi_wrk
23:52 asksol
do you think dns might be the culprit?
23:52 asksol
it has to connect to the database for every task
23:52 gpmidi_wrk
hmm
23:53 asksol
unless you set CELERY_DB_REUSE_MAX
23:53 gpmidi_wrk
to rabbit you mean?
23:53 asksol
(in 1.0.2)
23:53 asksol
to the database
23:53 gpmidi_wrk
oh, hmm, i don't think it has any tables in the db
23:54 harel_
gpmidi_wrk, no
23:54 harel_
it was for aggmment
23:54 gpmidi_wrk
harel_: oh, you just repalced the username when you pasted it?
23:54 harel_
yes
23:54 gpmidi_wrk
harel_: can you su up to that user?
23:54 asksol
harel_: add it to /etc/default/celeryd
23:54 harel_
asksol, any ideas about CELERYD_USER?
23:54 harel_
yes
23:54 harel_
i can
23:54 harel_
ok
23:55 harel_
thanks
23:55 asksol
or; export CELERYD_USER=foo
23:55 gpmidi_wrk
the hostname is staticly set in /etc/hosts
23:55 asksol
gpmidi_wrk: is celery.ping processed fast?
23:56 gpmidi_wrk
trying
23:56 gpmidi_wrk
what module is ping in?
23:56 harel_
asksol, not working.... nothing starts
23:56 harel_
i used quotes. should drop it maybe
23:56 gpmidi_wrk
oh, celery.task
23:57 harel_
hmm. no..
23:57 gpmidi_wrk
no, ping is slow too
23:57 asksol
harel_: with another user, you need to set --schedule
23:58 asksol
e.g. --schedule=/home/users/celerybeat-schedule
23:58 gpmidi_wrk
i'd almost suspect a time issue but it's all on the same host...
23:58 asksol
e.g. CELERYD_OPTS="--schedule=/home/users/celerybeat-schedule"
23:58 asksol
gpmidi_wrk: did you run with --debug?
23:58 gpmidi_wrk
yup
23:58 harel_
asksol, i'm referring to the celeryd process
23:59 asksol
harel_: ah, ok. so you're not using beat?
23:59 gpmidi_wrk
oh hey, i'm getting something in the logs:
23:59 gpmidi_wrk
"TaskPool: Finding dead pool processes..." right after the task runs
23:59 asksol
what do you mean it doesn't start?
23:59 harel_
i am, but i hvaent got to that problem yet ;o)
23:59 asksol
gpmidi_wrk: that's expected, it just supervises the pool
23:59 harel_
right now, at 3am my concern is celeryd running as my right user