由于在运行我的芹菜任务时出现高并发写入问题,我最近被迫从sqlite3将数据库切换到mysql(这些与sqlite3配合使用)。现在我已经配置了mysql数据库,它会抛出一个
C:\Sites\deltafy-massive-feed-backend>celery -A backend worker -l info
-------------- celery@Robert-PC v3.1.11 (Cipater)
---- **** -----
--- * *** * -- Windows-7-6.1.7601-SP1
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: backend:0x2d69b10
- ** ---------- .> transport: django://localhost//
- ** ---------- .> results: djcelery.backends.cache:CacheBackend
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ----
--- ***** ----- [queues]
--------------- .> celery exchange=celery(direct) key=celery
[tasks]
. backend.celery.debug_task
. private_api.tasks.gilt_script
. private_api.tasks.nordstrom_script
. private_api.tasks.zappos_script
[2014-06-14 01:37:13,625: ERROR/MainProcess] Unrecoverable error: WindowsError(123, 'The filename, directory name, or volume label syntax is incorrect')
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\celery\worker\__init__.py", line 206, in start
self.blueprint.start(self)
File "C:\Python27\lib\site-packages\celery\bootsteps.py", line 123, in start
step.start(parent)
File "C:\Python27\lib\site-packages\celery\bootsteps.py", line 373, in start
return self.obj.start()
File "C:\Python27\lib\site-packages\celery\concurrency\base.py", line 131, in start
self.on_start()
File "C:\Python27\lib\site-packages\celery\concurrency\prefork.py", line 117, in on_start
**self.options)
File "C:\Python27\lib\site-packages\billiard\pool.py", line 925, in __init__
self._setup_queues()
File "C:\Python27\lib\site-packages\billiard\pool.py", line 1267, in _setup_queues
self._inqueue = SimpleQueue()
File "C:\Python27\lib\site-packages\billiard\queues.py", line 369, in __init__
self._reader, self._writer = Pipe(duplex=False)
File "C:\Python27\lib\site-packages\billiard\__init__.py", line 97, in Pipe
return Pipe(duplex, rnonblock, wnonblock)
File "C:\Python27\lib\site-packages\billiard\py2\connection.py", line 233, in Pipe
1, obsize, ibsize, win32.NMPWAIT_WAIT_FOREVER, win32.NULL
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect`
另外,我预感到地址是问题并且包含无效字符,所以我进入了connection.py并打印出来。地址是:
c:\\.\pipe\pyc-5532-0-7ix5od
非常感谢任何关于这是做什么的想法,或任何解决问题的方法!即使从我的搜索时间来看,我也没有任何线索。
答案 0 :(得分:2)
这个问题是台球中的一个错误,它是Celery使用的多处理模块分支。 Here是该问题的链接。
您可以通过运行应该产生相同错误的python -c "from billiard.connection import Pipe; p = Pipe(duplex=False)"
来确认这一点。
Cogniva刚刚把这个问题推到了台球桌上。在撰写本文时,此修复程序已提交但未合并到celery/billiard。此问题将在台球版本3.4.0.0中得到解决。
安装修复程序:
$ pip uninstall billiard
$ git clone git@github.com:cogniva/billiard.git
$ cd billiard
$ git checkout bb6169ff1bdd8bc7c5520f7c47085063bc51d4c7
$ python setup.py install
要确认此修复程序正常运行python -c "from billiard.connection import Pipe; p = Pipe(duplex=False)"
。这次你不应该看到错误信息。