It takes 6 minutes for celery to start, which is extremely slow.

to start the service through celery, there is only one task, but it takes 6 minutes to start. It was started instantly before, celery version: 3.1.27. The service uses flask-socketio, so it uses eventlet to enable monkey_patch (), and flask_redis at the beginning. And after running flask, I found that processing the connection was slow, and then I tested it and found that redis.set () took a minute, so I suspected that the redis relationship caused the celery to start too slowly.

 -------------- celery@cent1416184 v3.1.17 (Cipater)
---- **** -----
--- * ***  * -- Linux-3.10.0-327.10.1.el7.x86_64-x86_64-with-centos-7.2.1511-Core
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app:         app:0x2ccbd90
- ** ---------- .> transport:   redis://localhost:6379/1
- ** ---------- .> results:     redis://localhost:6379/1
- *** --- * --- .> concurrency: 2 (eventlet)
-- ******* ----
--- ***** ----- [queues]
 -------------- .> celery           exchange=celery(direct) key=celery


[tasks]
  . app.api.tasks.process_task

[2018-05-09 06:59:40,009: INFO/MainProcess] Connected to redis://localhost:6379/1
[2018-05-09 07:00:40,021: INFO/MainProcess] mingle: searching for neighbors
[2018-05-09 07:02:41,037: INFO/MainProcess] mingle: all alone
[2018-05-09 07:03:41,056: INFO/MainProcess] pidbox: Connected to redis://localhost:6379/1.
[2018-05-09 07:05:41,063: WARNING/MainProcess] celery@cent1416184 ready.
Mar.10,2021

I don't know why I just changed a host. Although I changed a host, I still don't know why

.
Menu