-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Jobs Queue #148
Comments
Hi, The concurrent update in the logs should not be an issue. By the way, if you don't yet, I recommend you to use the new job runner instead of the jobs workers. As a quick fix, you can restart the connector workers and requeue all the started jobs. |
hi, thanks for the quick reply. we use connector 8.0.3.1.0 and connector-magento 8.0.3.0.0. ok i'll definitely have a look at the job runner. i tried restarting the job connector workers and reduced the workers to 1 and requeued all jobs and now the one active worker has 200 started jobs. something seems really wrong here. and i just found another error message in the odoo-server.log: 2015-09-17 09:35:10,223 31367 ERROR odoo-production openerp.http: Exception during JSON request handling. |
the Never saw such a thing. Could you activate the debug logs and show the logs of a few jobs? |
sorry for my late reply, i was traveling the last days. could you please tell me how to activate the debug logs for the connector and where i can find the log file for it? |
You should start your server with the option |
(or just start to use the job runner and don't lose time on that) |
ok you convinced me, i just tried setting up the job runner and i guess i have some questions to the setup. here is what i did, please correct me if i'm doing something wrong:
but how are the still open jobs now started? is the job runner automatically picking them up? I enabled the debug log option but I don't see anything the in log file regarding the job runner. thanks for your help! |
If you could copy-paste your AFAIK
Look like you declared them as local variables but they should be set as environment variables either with |
Thanks, I guess I'm at the next step right now. At least I see something in the log now: 2015-09-24 12:48:03,325 8151 INFO ? openerp.addons.connector.jobrunner: starting jobrunner thread (in prefork server) But still, no processes are really worked on. I also still see one Worker (which is not alive) and has a lot of Jobs attached. Can it be that this is causing a problem? |
The workers become useless with the job runner even if it shows one, just ignore it. From what I see, the jobs are correctly executed, but they seem to all be failing. You should check why jobs are failing on the form view of the jobs. What do you mean by?
Note aside: you should either put more Odoo workers, either put less places in the job runner than 5 (5 is too much for Magento IMO), otherwise the job runner can use the 5 Odoo workers and it will struggle to answer to HTTP requests. |
What I mean by "no process is really worked on" is the following: I had a failed process, which I requeued and this is the log output: 2015-09-24 12:48:08,945 8151 WARNING ? openerp.addons.connector.jobrunner.channels: unknown channel root.magento, using root channel for job cbcb1057-d147-4f12-b75a-9c0267bb4891 ... (after I requeued this job I get this message in the log) 2015-09-24 12:55:15,958 8151 WARNING ? openerp.addons.connector.jobrunner.channels: unknown channel root.magento, using root channel for job cbcb1057-d147-4f12-b75a-9c0267bb4891 and the job is still not running and in status "Pending" (and no other job is worked on too). |
Ok, well it seems that the jobrunner is executing jobs, but I found a new error message in the server-log: 2015-09-24 20:55:00,616 21644 DEBUG XXX openerp.modules.registry: Multiprocess signaling check: [Registry - old# 2 new# 2] [Cache - old# 3671 new# 3671] Do you have an idea whats going on here? |
Seems same than OCA/connector#102. It has been fixed in the release 3.2.0 of OCA/connector (OCA/connector#103) |
Perfect, that worked! But I now have a problem syncing products: Traceback (most recent call last): |
Seems to be an error returned by Magento when Odoo tries to download an image. |
Well thank you very much for your support, the jobrunner is working like a charm now! For everyone who does not directly understand the howto, here are the steps that it took me to migrate to the jobrunner:
and change the start-stop-daemon to:
|
Great! Thanks for reporting back what you did. |
What is the "Add" declaration about: (as in) Example might be (5) or (50 ?) |
@l-arnold you may find what you are looking for on http://odoo-connector.com/guides/jobrunner.html |
Thx @guewen for the context. JobRunner link says "obviously not for production purposes". Is that still the case? |
My links above had to do with some "renaming" that had been done in a project and Michael's outline made a good outline of the different compents that are "interlaced" to get the server running properly. Add to that my test Connector stopped working the other day and this seemed potentially a path towards a fix. |
The rendering of the documentation page is not optimal. What is not for production purpose is "running with the threaded server". The jobrunner is perfectly fit for production. |
Thanks @sbidoul Testing this on my side. I've gotten a generally clean start now. I had to remove (from Jobrunner Page) "–workers > 1" which Michael also does not declare but does declare in openerp-server.conf. (workers = 4 in my testing) The problem I have is that I have 2 "requeued" jobs now, but they do not ever start. I will go back to see if any other "addons" need to be set for jobrunner. Using a Setup likely from July, but with current Git Clones. It is possible that a "requeue" is not possible as it had been created "pre jobrunner setup". I just created a NEW JOB however and getting the same result. Likely need to look at the logs. Any other ways to check JobRunner's functioning? UPDATE |
Hm. Indeed
Looking at the log with the debug option mentioned by @guewen above is the way to go. A frequent issue is when Odoo is forced-shutdown. In such a situation, running jobs are killed while the runner has no way to notice it, so they stay in the |
Not really getting to "started". Just "enqueued". I assume there were no new dependencies that needed to be installed for JobRunner to function. Is Jobrunner a component of the Connector or a component of the Odoo Base? My current setup has obscured Logs so that will take me a bit to provision. |
Previously I had not had the following as part of my .init script. |
@l-arnold I've never tried to put --load=web,connector in the config file. Jobs that stay |
@sbidoul A: I will work on some soft Shutdowns. Getting some different response now. Looks like I have either a Protocol Error (can I run over https ?) or a XMLRPC Error (when set to http) (when set to https) |
@sbidoul (Hadn't looked at the Magento Server).. In ouch mode. Restarting. Most probably the issue, though need to see what is underlying that. Your Guidance on those details will be helpful moving forward. The jobrunner is much much faster to my view. I will explore other Updates that may have come from the code. Seems to have solved it. Everything worked through except one order showed up with a New Payment Option (need to fix). So we are getting there. Resolution:
Shouldn't this be able to run over HTTPS ? UPDATE: I need to update my Server Cert on Magento, thus I am running the connector for test purposes over HTTP. I expect the error over HTTPS is generated by CERT error. Not completely clear however. Kudos to all for a remarkable system. |
[BIZ-2512] fix file parameter value
hi,
we went live yesterday with our odoo setup. the whole sync from magento worked till we came to the sales-order part. 1200 sales orders were imported fine, but then the jobs queue started to make problems. i have now around 200 jobs in the queue which are all in state "Started" but are not running. We have 5 workers running and when i look in the odoo-connector.log i see the following error message:
2015-09-17 08:54:22,125 31162 ERROR odoo-production openerp.sql_db: bad query: UPDATE "queue_job" SET "job_function_id"=7,"channel"='root.magento' WHERE id IN (8267)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
TransactionRollbackError: could not serialize access due to concurrent update
CONTEXT: SQL statement "SELECT 1 FROM ONLY "public"."queue_worker" x WHERE "id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x"
Can I pause all jobs and restart each one by one to find the issue or what is the best way to solve this?
thanks,
michael
The text was updated successfully, but these errors were encountered: