Closed asaunier closed 6 years ago
Probably related: https://groups.google.com/forum/#!topic/sqlalchemy/-_gYIH7uMJ0
I just bumped into this problem... Does anyone have a hint what is going on and on how to solve it ?
I still have this issue...
It is really weird, because it only happens when using the edit app through Apache...
I have to restart Apache, reload the edit interface first, then this issue disappears...
I really do not get what is going wrong. Moreover, this now happens on editing layers which contain elements.
If I activate only one layer, then it works... But if I activate all layers (which are all editable) then I get the famous error. As example, here is a snapshot of the "editing" layer tree:
Do you have a new trace?
It is not super explicit... But here it is:
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] mod_wsgi (pid=8048): Exception occurred processing WSGI script 'D:/Applications/Mapfish/production/apache/application.wsgi'., referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] Traceback (most recent call last):, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\fanstatic\\publisher.py", line 219, in __call__, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] return self.app(environ, start_response), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\fanstatic\\injector.py", line 54, in __call__, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] response = request.get_response(self.app), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\webob\\request.py", line 1320, in send, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] application, catch_exc_info=False), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\webob\\request.py", line 1284, in call_application, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] app_iter = application(self.environ, start_response), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\pyramid\\router.py", line 243, in __call__, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] response = self.invoke_subrequest(request, use_tweens=True), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\pyramid\\router.py", line 218, in invoke_subrequest, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] response = handle_request(request), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\pyramid\\tweens.py", line 21, in excview_tween, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] response = handler(request), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\pyramid_tm\\__init__.py", line 94, in tm_tween, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] reraise(*exc_info), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\pyramid_tm\\__init__.py", line 75, in tm_tween, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] response = handler(request), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\pyramid\\router.py", line 164, in handle_request, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] response = view_callable(context, request), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\pyramid\\config\\views.py", line 353, in rendered_view, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] result = view(context, request), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\pyramid\\config\\views.py", line 481, in _class_requestonly_view, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] response = getattr(inst, attr)(), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\c2cgeoportal\\views\\layers.py", line 178, in read_many, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] for f in self._proto_read(layer).features:, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\c2cgeoportal\\views\\layers.py", line 170, in _proto_read, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] return proto.read(self.request, filter=filter_), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\papyrus\\protocol.py", line 298, in read, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] objs = self._query(request, filter), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\papyrus\\protocol.py", line 275, in _query, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] return query.all(), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\sqlalchemy\\orm\\query.py", line 2320, in all, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] return list(self), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\sqlalchemy\\orm\\query.py", line 2434, in __iter__, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] context = self._compile_context(), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\sqlalchemy\\orm\\query.py", line 2810, in _compile_context, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] entity.setup_context(self, context), referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\sqlalchemy\\orm\\query.py", line 3194, in setup_context, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] column_collection=context.primary_columns, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] File "d:\\applications\\mapfish\\production\\.build\\venv\\Lib\\site-packages\\sqlalchemy\\orm\\interfaces.py", line 465, in setup, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] strat = self.strategy, referer: https://sitnintra.ne.ch/edit
[Wed Apr 06 08:41:30 2016] [error] [client 148.196.28.6] AttributeError: 'RelationshipProperty' object has no attribute 'strategy', referer: https://sitnintra.ne.ch/edit
But if I activate all layers
About how many layers?
11, like in the image...
Using (or activating) only one layer resolves the problem... I am wondering if this is not a problem because some of these layers use relationships to tables containing lists. Furthermore, we have tables containing for example a list of colors that we link (foreign key) to editable layers. These list tables may be related more then once to editable layers. (hmmm.... wondering if my explanation is really clear...)
I still have this issue.... It appears from time to time and restarting Apache resolves the problem, but I do not really know what triggers it...
Maybe this has to do with concurrent requests, see http://stackoverflow.com/questions/13371754/making-sql-alchemy-play-nice-with-google-app-engine
But I am really not sure about it (and I do not understand what is really happening here...)
Moved to Jira
(for the records, I have not been able to reproduce the problem since I actually added items to the mentioned layers)
In a project, I have observed a strange behaviour in the editing interface while clicking on the map to select editable items: a layer had no item (empty DB table) and made the "layers_read_many" route crash (error 500).
The logs said:
Eveything works fine since I added an item in the layer. Even if I delete all items from this layer and try again to make a new "layers_read_many" request including the mentioned layer...
@elemoine Do you think it could be a problem in the editing interface with "not initialized" layers?