openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #13351
[Bug 1021556] [NEW] Catch Exception when user login that the user is running a cron task
Public bug reported:
Catch Exception when user login that the user is running a cron task
I add a cron task use the 'admin' user to run it per 5 min ...
and sometimes, I try to use the 'admin' user login, I got the following exception:
Is it a bug?
<code>
psycopg2.OperationalError: could not obtain lock on row in relation "res_users"
File "c:\Program Files\Python26\Lib\threading.py", line 497, in __bootstrap
self.__bootstrap_inner()
File "c:\Program Files\Python26\Lib\threading.py", line 525, in __bootstrap_inner
self.run()
File "c:\Program Files\Python26\Lib\threading.py", line 477, in run
self.__target(*self.__args, **self.__kwargs)
File "c:\Program Files\Python26\Lib\SocketServer.py", line 558, in process_request_thread
self.finish_request(request, client_address)
File "c:\Program Files\Python26\Lib\SocketServer.py", line 320, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\Program Files\Python26\Lib\SocketServer.py", line 615, in __init__
self.handle()
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\serving.py", line 181, in handle
rv = BaseHTTPRequestHandler.handle(self)
File "c:\Program Files\Python26\Lib\BaseHTTPServer.py", line 329, in handle
self.handle_one_request()
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\serving.py", line 214, in handle_one_request
return self.run_wsgi()
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\serving.py", line 159, in run_wsgi
execute(app)
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\serving.py", line 146, in execute
application_iter = app(environ, start_response)
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\contrib\fixers.py", line 110, in __call__
return self.app(environ, start_response)
File "c:\OpenERP\openerp-server-6.1\openerp\wsgi\core.py", line 397, in application
result = handler(environ, start_response)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 467, in __call__
return self.dispatch(environ, start_response)
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\wsgi.py", line 409, in __call__
return self.app(environ, start_response)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 496, in dispatch
result = handler( request, self.config)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 240, in json_handler
return JsonRequest(request, config).dispatch(controller, f)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 180, in dispatch
response["result"] = method(controller, self, **self.params)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\controllers\main.py", line 454, in get_session_info
return self.session_info(req)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\controllers\main.py", line 442, in session_info
req.session.ensure_valid()
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\session.py", line 88, in ensure_valid
self.assert_valid(True)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\session.py", line 83, in assert_valid
self.build_connection().check_login(force)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\openerplib\main.py", line 180, in check_login
self.user_id = self.get_service("common").login(self.database, self.login, self.password)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\openerplib\main.py", line 117, in proxy
result = self.connector.send(self.service_name, method, *args)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 594, in send
result = openerp.netsvc.dispatch_rpc(service_name, method, args)
File "c:\OpenERP\openerp-server-6.1\openerp\netsvc.py", line 360, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "c:\OpenERP\openerp-server-6.1\openerp\service\web_services.py", line 384, in dispatch
return fn(*params)
File "c:\OpenERP\openerp-server-6.1\openerp\service\web_services.py", line 389, in exp_login
res = security.login(db, login, password)
File "c:\OpenERP\openerp-server-6.1\openerp\service\security.py", line 31, in login
return user_obj.login(db, login, password)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\base\res\res_users.py", line 490, in login
(tools.ustr(login), tools.ustr(password)))
File "c:\OpenERP\openerp-server-6.1\openerp\sql_db.py", line 152, in wrapper
return f(self, *args, **kwargs)
File "c:\OpenERP\openerp-server-6.1\openerp\sql_db.py", line 219, in execute
_logger.exception("bad query: %s", self._obj.query or query)
File "c:\Program Files\Python26\Lib\logging\__init__.py", line 1080, in exception
self.error(*((msg,) + args), **{'exc_info': 1})
File "c:\OpenERP\openerp-server-6.1\openerp\sql_db.py", line 212, in execute
res = self._obj.execute(query, params)
** Affects: openobject-addons
Importance: Undecided
Status: New
** Tags: cron lock mrshelly res.users row
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1021556
Title:
Catch Exception when user login that the user is running a cron task
Status in OpenERP Addons (modules):
New
Bug description:
Catch Exception when user login that the user is running a cron task
I add a cron task use the 'admin' user to run it per 5 min ...
and sometimes, I try to use the 'admin' user login, I got the following exception:
Is it a bug?
<code>
psycopg2.OperationalError: could not obtain lock on row in relation "res_users"
File "c:\Program Files\Python26\Lib\threading.py", line 497, in __bootstrap
self.__bootstrap_inner()
File "c:\Program Files\Python26\Lib\threading.py", line 525, in __bootstrap_inner
self.run()
File "c:\Program Files\Python26\Lib\threading.py", line 477, in run
self.__target(*self.__args, **self.__kwargs)
File "c:\Program Files\Python26\Lib\SocketServer.py", line 558, in process_request_thread
self.finish_request(request, client_address)
File "c:\Program Files\Python26\Lib\SocketServer.py", line 320, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\Program Files\Python26\Lib\SocketServer.py", line 615, in __init__
self.handle()
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\serving.py", line 181, in handle
rv = BaseHTTPRequestHandler.handle(self)
File "c:\Program Files\Python26\Lib\BaseHTTPServer.py", line 329, in handle
self.handle_one_request()
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\serving.py", line 214, in handle_one_request
return self.run_wsgi()
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\serving.py", line 159, in run_wsgi
execute(app)
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\serving.py", line 146, in execute
application_iter = app(environ, start_response)
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\contrib\fixers.py", line 110, in __call__
return self.app(environ, start_response)
File "c:\OpenERP\openerp-server-6.1\openerp\wsgi\core.py", line 397, in application
result = handler(environ, start_response)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 467, in __call__
return self.dispatch(environ, start_response)
File "c:\Program Files\Python26\Lib\site-packages\werkzeug\wsgi.py", line 409, in __call__
return self.app(environ, start_response)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 496, in dispatch
result = handler( request, self.config)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 240, in json_handler
return JsonRequest(request, config).dispatch(controller, f)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 180, in dispatch
response["result"] = method(controller, self, **self.params)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\controllers\main.py", line 454, in get_session_info
return self.session_info(req)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\controllers\main.py", line 442, in session_info
req.session.ensure_valid()
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\session.py", line 88, in ensure_valid
self.assert_valid(True)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\session.py", line 83, in assert_valid
self.build_connection().check_login(force)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\openerplib\main.py", line 180, in check_login
self.user_id = self.get_service("common").login(self.database, self.login, self.password)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\openerplib\main.py", line 117, in proxy
result = self.connector.send(self.service_name, method, *args)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\web\common\http.py", line 594, in send
result = openerp.netsvc.dispatch_rpc(service_name, method, args)
File "c:\OpenERP\openerp-server-6.1\openerp\netsvc.py", line 360, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "c:\OpenERP\openerp-server-6.1\openerp\service\web_services.py", line 384, in dispatch
return fn(*params)
File "c:\OpenERP\openerp-server-6.1\openerp\service\web_services.py", line 389, in exp_login
res = security.login(db, login, password)
File "c:\OpenERP\openerp-server-6.1\openerp\service\security.py", line 31, in login
return user_obj.login(db, login, password)
File "c:\OpenERP\openerp-server-6.1\openerp\addons\base\res\res_users.py", line 490, in login
(tools.ustr(login), tools.ustr(password)))
File "c:\OpenERP\openerp-server-6.1\openerp\sql_db.py", line 152, in wrapper
return f(self, *args, **kwargs)
File "c:\OpenERP\openerp-server-6.1\openerp\sql_db.py", line 219, in execute
_logger.exception("bad query: %s", self._obj.query or query)
File "c:\Program Files\Python26\Lib\logging\__init__.py", line 1080, in exception
self.error(*((msg,) + args), **{'exc_info': 1})
File "c:\OpenERP\openerp-server-6.1\openerp\sql_db.py", line 212, in execute
res = self._obj.execute(query, params)
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1021556/+subscriptions
Follow ups
References